def team_to_repos(api, no_repos, organization):
    """Create a team_to_repos mapping for use in _add_repos_to_teams, anc create
    each team and repo. Return the team_to_repos mapping.
    """
    num_teams = 10
    # arrange
    team_names = ["team-{}".format(i) for i in range(num_teams)]
    repo_names = ["some-repo-{}".format(i) for i in range(num_teams)]
    for name in team_names:
        organization.create_team(name, permission="pull")
    for name in repo_names:
        organization.create_repo(name)
    team_to_repos = {
        team_name: [repo_name]
        for team_name, repo_name in zip(team_names, repo_names)
    }
    return team_to_repos