nodes: 0, module; 1, function_definition; 2, function_name:get_formatter; 3, parameters; 4, block; 5, identifier:name; 6, expression_statement; 7, for_statement; 8, comment:"""
      Looks up a formatter class given a prefix to it.
      The names are sorted, and the first matching class is returned.
      """; 9, identifier:k; 10, call; 11, block; 12, identifier:sorted; 13, argument_list; 14, if_statement; 15, identifier:_FORMATTERS; 16, call; 17, block; 18, attribute; 19, argument_list; 20, return_statement; 21, identifier:k; 22, identifier:startswith; 23, identifier:name; 24, subscript; 25, identifier:_FORMATTERS; 26, identifier:k
code: def get_formatter(name):
      """
      Looks up a formatter class given a prefix to it.
      The names are sorted, and the first matching class is returned.
      """
      for k in sorted(_FORMATTERS):
          if k.startswith(name):
              return _FORMATTERS[k]