code: def convert_to_consumable_types (self, project, name, prop_set, sources, only_one=False):
          
          if __debug__:
              from .targets import ProjectTarget
              assert isinstance(name, basestring) or name is None
              assert isinstance(project, ProjectTarget)
              assert isinstance(prop_set, property_set.PropertySet)
              assert is_iterable_typed(sources, virtual_target.VirtualTarget)
              assert isinstance(only_one, bool)
          consumed = []
          missing_types = []
  
          if len (sources) > 1:
              # Don't know how to handle several sources yet. Just try
              # to pass the request to other generator
              missing_types = self.source_types_
  
          else:
              (c, m) = self.consume_directly (sources [0])
              consumed += c
              missing_types += m
  
          # No need to search for transformation if
          # some source type has consumed source and
          # no more source types are needed.
          if only_one and consumed:
              missing_types = []
  
          #TODO: we should check that only one source type
          #if create of 'only_one' is true.
          # TODO: consider if consuned/bypassed separation should
          # be done by 'construct_types'.
  
          if missing_types:
              transformed = construct_types (project, name, missing_types, prop_set, sources)
  
              # Add targets of right type to 'consumed'. Add others to
              # 'bypassed'. The 'generators.construct' rule has done
              # its best to convert everything to the required type.
              # There's no need to rerun it on targets of different types.
  
              # NOTE: ignoring usage requirements
              for t in transformed[1]:
                  if t.type() in missing_types:
                      consumed.append(t)
  
          consumed = unique(consumed)
  
          return consumed
docs: Attempts to convert 'source' to the types that this generator can
              handle. The intention is to produce the set of targets can should be
              used when generator is run.
              only_one:   convert 'source' to only one of source types
                          if there's more that one possibility, report an
                          error.
  
              Returns a pair:
                  consumed: all targets that can be consumed.