code: def _extract_named_added_loss_terms(module, memo=None, prefix=""):
      if memo is None:
          memo = set()
      if hasattr(module, "_added_loss_terms"):
          for name, strategy in module._added_loss_terms.items():
              if strategy is not None and strategy not in memo:
                  memo.add(strategy)
                  yield prefix + (
                      "." if prefix else ""
                  ) + name, strategy
      for mname, module_ in module.named_children():
          submodule_prefix = prefix + ("." if prefix else "") + mname
          for name, strategy in _extract_named_added_loss_terms(
              module=module_, memo=memo, prefix=submodule_prefix
          ):
              yield name, strategy
  
imports: import copy
  import inspect
  import itertools
  import operator
  from collections import OrderedDict
  from typing import Union
  import torch
  from linear_operator.operators import LinearOperator
  from torch import nn, Tensor
  from torch.distributions import Distribution
  from .constraints import Interval
label_desc: Use image node_id 5 for calling a global function with example usage: _extract_named_added_loss_terms(module, memo, prefix) without return types