def pipedpath_constructor(loader, node):
    path = loader.construct_python_str(node)
    original_path = path
    package = piped
    
    # the path may be an empty string, which should be the root piped package path.
    if path:
        paths = path.split(os.path.sep)

        for i in range(1, len(paths)+1):
            package_name = '.'.join(['piped'] + paths[:i])

            try:
                any = reflect.namedAny(package_name)
            except (__HOLE__, reflect.ObjectNotFound) as e:
                # AttributeErrors may occur if we look a file that has the
                # same prefix as an existing module or package
                break

            # we don't want to start looking into modules:
            if not is_package(any):
                break
            package = any

            # update the remaining path
            path = os.path.sep.join(paths[i:])

    root = filepath.FilePath(package.__file__).parent()
    fp = root.preauthChild(util.expand_filepath(path))

    # add markers for dumping the configuration
    fp.origpath = original_path
    fp.pipedpath = True
    return fp
dataset/ETHPy150Open foundit/Piped/piped/yamlutil.py/pipedpath_constructor