def list_team_codes():
<EOL>cleanlist = sorted(TEAM_DATA, key=lambda k: (k["<STR_LIT>"]["<STR_LIT:name>"], k["<STR_LIT:code>"]))<EOL>leaguenames = sorted(list(set([team["<STR_LIT>"]["<STR_LIT:name>"] for team in cleanlist])))<EOL>for league in leaguenames:<EOL><INDENT>teams = [team for team in cleanlist if team["<STR_LIT>"]["<STR_LIT:name>"] == league]<EOL>click.secho(league, fg="<STR_LIT>", bold=True)<EOL>for team in teams:<EOL><INDENT>if team["<STR_LIT:code>"] != "<STR_LIT:null>":<EOL><INDENT>click.secho(u"<STR_LIT>".format(team["<STR_LIT:code>"], team["<STR_LIT:name>"]), fg="<STR_LIT>")<EOL><DEDENT><DEDENT>click.secho("<STR_LIT>")<EOL><DEDENT>
List team names in alphabetical order of team ID, per league.