<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply_injectables(self, targets):
 """Given an iterable of `Target` instances, apply their transitive injectables."""

    target_types = {type(t) for t in targets}
    target_subsystem_deps = {s for s in itertools.chain(*(t.subsystems() for t in target_types))}
    for subsystem in target_subsystem_deps:
      # TODO: The is_initialized() check is primarily for tests and would be nice to do away with.
      if issubclass(subsystem, InjectablesMixin) and subsystem.is_initialized():
        subsystem.global_instance().injectables(self)