code: def get_formatter(name):
      
      for k in sorted(_FORMATTERS):
          if k.startswith(name):
              return _FORMATTERS[k]
docs: Looks up a formatter class given a prefix to it.
      The names are sorted, and the first matching class is returned.