def make_path_relative(path, rel_to):
    path_filename = os.path.basename(path)
    path = os.path.dirname(path)
    path = os.path.normpath(os.path.abspath(path))
    rel_to = os.path.normpath(os.path.abspath(rel_to))
    path_parts = path.strip(os.path.sep).split(os.path.sep)
    rel_to_parts = rel_to.strip(os.path.sep).split(os.path.sep)
    while path_parts and rel_to_parts and path_parts[0] == rel_to_parts[0]:
        path_parts.pop(0)
        rel_to_parts.pop(0)
    full_parts = ['..'] * len(rel_to_parts) + path_parts + [path_filename]
    if full_parts == ['']:
        return '.' + os.path.sep
    return os.path.sep.join(full_parts)
Ensure that default values are selected in forms.
dataset/ETHPy150Open anzev/hedwig/build/pip/pip/utils/__init__.py/make_path_relative--crossover with--dataset/ETHPy150Open django/django-localflavor/tests/test_pk/tests.py/PKLocalflavorTests.test_default_values