code: def get_exporter(obj, name):
      
      if name not in exporter_index:
          raise TypeError(
              ("exporter type '%s' is not registered: " % name) +
              ("registered types: %r" % sorted(exporter_index.keys()))
          )
  
      for base_class in exporter_index[name]:
          if isinstance(obj, base_class):
              return exporter_index[name][base_class](obj)
  
      raise TypeError("exporter type '%s' for a %r is not registered" % (
          name, type(obj)
      ))
docs: Get an exporter for the
  
      :param obj: object to export
      :type obj: :class:`Component <cqparts.Component>`
      :param name: registered name of exporter
      :type name: :class:`str`
      :return: an exporter instance of the given type
      :rtype: :class:`Exporter`
      :raises TypeError: if exporter cannot be found