def open_repo(path_or_repo):
 if isinstance(path_or_repo, BaseRepo):
  return path_or_repo
 return Repo(path_or_repo)

def open_repo ( path_or_repo ) : if isinstance ( path_or_repo , BaseRepo ) : return path_or_repo return Repo ( path_or_repo )
open a copy of a repo in a temporary directory .