def find_location(self, root, path, prefix=None):
if prefix:<EOL><INDENT>prefix = '<STR_LIT>' % (prefix, os.sep)<EOL>if not path.startswith(prefix):<EOL><INDENT>return None<EOL><DEDENT>path = path[len(prefix):]<EOL><DEDENT>path = safe_join(root, path)<EOL>if os.path.exists(path):<EOL><INDENT>return path<EOL><DEDENT>
Finds a requested media file in a location, returning the found
absolute path (or ``None`` if no match).