code: def compose_capability(base, *classes):
      
      if _debug: compose_capability._debug("compose_capability %r %r", base, classes)
  
      # make sure the base is a Collector
      if not issubclass(base, Collector):
          raise TypeError("base must be a subclass of Collector")
  
      # make sure you only add capabilities
      for cls in classes:
          if not issubclass(cls, Capability):
              raise TypeError("%s is not a Capability subclass" % (cls,))
  
      # start with everything the base has and add the new ones
      bases = (base,) + classes
  
      # build a new name
      name = base.__name__
      for cls in classes:
          name += '+' + cls.__name__
  
      # return a new type
      return type(name, bases, {})
docs: Create a new class starting with the base and adding capabilities.