def _sanitize_relative_path(self, path):
last = None<EOL>path = os.path.normpath(path)<EOL>while path != last:<EOL><INDENT>last = path<EOL>path = path.lstrip(os.sep).lstrip('<STR_LIT:/>')<EOL>path = path.lstrip(os.pardir).lstrip('<STR_LIT:..>')<EOL>drive, path = os.path.splitdrive(path)  <EOL><DEDENT>return path<EOL>
Return a sanitised relative path for which
        os.path.abspath(os.path.join(base, path)).startswith(base)