code: def partition_targets_by_compatibility(self, targets):
      
      tgts_by_compatibilities = defaultdict(list)
      filters = set()
  
      for target in targets:
        if isinstance(target, PythonTarget):
          c = self.python_setup.compatibility_or_constraints(target)
          tgts_by_compatibilities[c].append(target)
          filters.update(c)
      return tgts_by_compatibilities, filters
docs: Partition targets by their compatibility constraints.
  
      :param targets: a list of `PythonTarget` objects
      :returns: (tgts_by_compatibilities, filters): a dict that maps compatibility constraints
        to a list of matching targets, the aggregate set of compatibility constraints imposed
        by the target set
      :rtype: (dict(str, list), set)