parameters: (codes: set = None, sort: bool = True)
return_statement: return cs
docstring: Converts country codes into a list of code/name tuples suitable for choices on a form. If a set of country codes
      is not provided, we use the set of all countries.
docstring_summary: Converts country codes into a list of code/name tuples suitable for choices on a form. If a set of country codes
      is not provided, we use the set of all countries.
docstring_tokens: Converts country codes into a list of code / name tuples suitable for choices on a form . If a set of country codes is not provided we use the set of all countries .
function: def choices(codes: set = None, sort: bool = True) -> tuple:
      """
      Converts country codes into a list of code/name tuples suitable for choices on a form. If a set of country codes
      is not provided, we use the set of all countries.
      """
      cs = tuple((c, NAMES[c]) for c in codes) if codes else tuple((c, n) for c, n in NAMES.items())
  
      if sort:
          cs = sorted(cs, key=lambda x: x[1])
      return cs
function_tokens: def choices ( codes : set = None , sort : bool = True ) -> tuple : cs = tuple ( ( c , NAMES [ c ] ) for c in codes ) if codes else tuple ( ( c , n ) for c , n in NAMES . items ( ) ) if sort : cs = sorted ( cs , key = lambda x : x [ 1 ] ) return cs