<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_path_matching(name):
 """Get path matching a name. Parameters name : string Name to search for. Returns ------- string Full filepath. """

    # first try looking in the user folder
    p = os.path.join(os.path.expanduser("~"), name)
    # then try expanding upwards from cwd
    if not os.path.isdir(p):
        p = None
        drive, folders = os.path.splitdrive(os.getcwd())
        folders = folders.split(os.sep)
        folders.insert(0, os.sep)
        if name in folders:
            p = os.path.join(drive, *folders[: folders.index(name) + 1])
    # TODO: something more robust to catch the rest of the cases?
    return p