code: def for_all_targets(self, module, func, filter_func=None):
          
  
          for target in self.targets(module):
              if filter_func is None or filter_func(target):
                  func(target)
docs: Call func once for all of the targets of this module.