code: def targets(self, predicate=None, **kwargs):
      
      target_set = self._collect_targets(self.target_roots, **kwargs)
  
      synthetics = OrderedSet()
      for synthetic_address in self.build_graph.synthetic_addresses:
        if self.build_graph.get_concrete_derived_from(synthetic_address) in target_set:
          synthetics.add(self.build_graph.get_target(synthetic_address))
      target_set.update(self._collect_targets(synthetics, **kwargs))
  
      return list(filter(predicate, target_set))
docs: Selects targets in-play in this run from the target roots and their transitive dependencies.
  
      Also includes any new synthetic targets created from the target roots or their transitive
      dependencies during the course of the run.
  
      See Target.closure_for_targets for remaining parameters.
  
      :API: public
  
      :param predicate: If specified, the predicate will be used to narrow the scope of targets
                        returned.
      :param bool postorder: `True` to gather transitive dependencies with a postorder traversal;
                            `False` or preorder by default.
      :returns: A list of matching targets.