def get_repository_and_repository_dependencies_from_repo_info_dict(app, repo_info_dict):
 repository_name = list(repo_info_dict.keys())[0]
 repo_info_tuple = repo_info_dict[repository_name]
 (description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies) = get_repo_info_tuple_contents(repo_info_tuple)
 if hasattr(app, 'install_model'):
  tool_shed = get_tool_shed_from_clone_url(repository_clone_url)
  repository = get_repository_for_dependency_relationship(app, tool_shed, repository_name, repository_owner, changeset_revision)
 else:
  repository = get_repository_by_name_and_owner(app, repository_name, repository_owner)
 return (repository, repository_dependencies)

def get_repository_and_repository_dependencies_from_repo_info_dict ( app , repo_info_dict ) : repository_name = list ( repo_info_dict . keys ( ) ) [ 0 ] repo_info_tuple = repo_info_dict [ repository_name ] ( description , repository_clone_url , changeset_revision , ctx_rev , repository_owner , repository_dependencies , tool_dependencies ) = get_repo_info_tuple_contents ( repo_info_tuple ) if hasattr ( app , 'install_model' ) : tool_shed = get_tool_shed_from_clone_url ( repository_clone_url ) repository = get_repository_for_dependency_relationship ( app , tool_shed , repository_name , repository_owner , changeset_revision ) else : repository = get_repository_by_name_and_owner ( app , repository_name , repository_owner ) return ( repository , repository_dependencies )
return a tool_shed_repository or repository record defined by the information in the received repo_info_dict .