def METHOD_NAME(repo):
    result = {}
    result['repo_id'] = repo.repo_id
    result['name'] = repo.repo_name
    result['size'] = repo.size
    result['shared_by'] = repo.user
    if '@seafile_group' in repo.user:
        group_id = get_group_id_by_repo_owner(repo.user)
        group_name = group_id_to_name(group_id)
        result['shared_by_name'] = group_name
    else:
        result['shared_by_name'] = email2nickname(repo.user)
    result['permission'] = repo.permission
    result['group_id'] = repo.group_id
    result['encrypted'] = repo.encrypted
    return result