def normrelpath(base, target):
if not all(map(isabs, [base, target])):<EOL><INDENT>return target<EOL><DEDENT>return relpath(normpath(target), dirname(normpath(base)))<EOL>
This function takes the base and target arguments as paths, and
returns an equivalent relative path from base to the target, if both
provided paths are absolute.