<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delocate_path(tree_path, lib_path, lib_filt_func = None, copy_filt_func = filter_system_libs):
 """ Copy required libraries for files in `tree_path` into `lib_path` Parameters tree_path : str Root path of tree to search for required libraries lib_path : str Directory into which we copy required libraries lib_filt_func : None or str or callable, optional If None, inspect all files for dependencies on dynamic libraries. If callable, accepts filename as argument, returns True if we should inspect the file, False otherwise. If str == "dylibs-only" then inspect only files with known dynamic library extensions (``.dylib``, ``.so``). copy_filt_func : None or callable, optional If callable, called on each library name detected as a dependency; copy where ``copy_filt_func(libname)`` is True, don't copy otherwise. Default is callable rejecting only libraries beginning with ``/usr/lib`` or ``/System``. None means copy all libraries. This will usually end up copying large parts of the system run-time. Returns ------- copied_libs : dict dict containing the (key, value) pairs of (``copied_lib_path``, ``dependings_dict``), where ``copied_lib_path`` is a library real path that was copied into `lib_sdir` of the wheel packages, and ``dependings_dict`` is a dictionary with key, value pairs where the key is a file in the path depending on ``copied_lib_path``, and the value is the ``install_name`` of ``copied_lib_path`` in the depending library. """

    if lib_filt_func == "dylibs-only":
        lib_filt_func = _dylibs_only
    if not exists(lib_path):
        os.makedirs(lib_path)
    lib_dict = tree_libs(tree_path, lib_filt_func)
    if not copy_filt_func is None:
        lib_dict = dict((key, value) for key, value in lib_dict.items()
                        if copy_filt_func(key))
    copied = delocate_tree_libs(lib_dict, lib_path, tree_path)
    return copy_recurse(lib_path, copy_filt_func, copied)