<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def for_all_targets(self, module, func, filter_func=None):
 """Call func once for all of the targets of this module."""


        for target in self.targets(module):
            if filter_func is None or filter_func(target):
                func(target)