def _get_library_root_key_for_os_path(self, path):
        """Return library root key if path is within library root paths"""
        path = os.path.realpath(path)
        library_root_key = None
        for library_root_key, library_root_path in self._library_root_paths.items():
            rel_path = os.path.relpath(path, library_root_path)
            if rel_path.startswith('..'):
                library_root_key = None
                continue
            else:
                break
        return library_root_key
def _get_library_root_key_for_os_path ( self , path ) : path = os . path . realpath ( path ) library_root_key = None for library_root_key , library_root_path in self . _library_root_paths . items ( ) : rel_path = os . path . relpath ( path , library_root_path ) if rel_path . startswith ( '..' ) : library_root_key = None continue else : break return library_root_key
Return library root key if path is within library root paths