def _format_teams(teams):
    """Return a formatted string of the teams passed in"""
    result = ''
    for team in teams:
        result += team['name'] + '\n'
        if len(team['users']) > 1:
            for user in team['users']:
                result += '|    ' + user + '\n'
        result += '\n'
    return result.strip()
