<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_repo_teams(repo_name, profile='github'):
    '''
    Return teams belonging to a repository.

    .. versionadded:: 2017.7.0

    repo_name
        The name of the repository from which to retrieve teams.

    profile
        The name of the profile configuration to use. Defaults to ``github``.

    CLI Example:

    .. code-block:: bash

        salt myminion github.get_repo_teams salt
        salt myminion github.get_repo_teams salt profile='my-github-profile'
    '''
    ret = []
    org_name = _get_config_value(profile, 'org_name')
    client = _get_client(profile)

    try:
        repo = client.get_repo('/'.join([org_name, repo_name]))
    except github.UnknownObjectException:
        raise CommandExecutionError(
            'The \'{0}\' repository under the \'{1}\' organization could not '
            'be found.'.format(repo_name, org_name)
        )
    try:
        teams = repo.get_teams()
        for team in teams:
            ret.append({
                'id': team.id,
                'name': team.name,
                'permission': team.permission
            })
    except github.UnknownObjectException:
        raise CommandExecutionError(
            'Unable to retrieve teams for repository \'{0}\' under the \'{1}\' '
            'organization.'.format(repo_name, org_name)
        )
    return ret