code: def apply_trainable_opt_params(
      opt: _torch.optim.Optimizer, override: _OverrideType
  ) -> None:
      r"""Apply learned hyperparameters back to original optimizer.
  
      Args:
          opt: the original optimizer. The hyperparameters in its parameter groups
              will be modified in place.
          override: dictionary of the format used for the override kwarg of
              differentiable optimizers.
      """
      for k, v in override.items():
          # Sanity check
          if (len(v) != 1) and (len(v) != len(opt.param_groups)):
              raise ValueError(
                  "Mismatch between the number of override tensors for "
                  "optimizer parameter {} and the number of "
                  "parameter groups.".format(k)
              )
          for group_idx, group in enumerate(opt.param_groups):
              replacement = v[0] if len(v) is 1 else v[group_idx]
              group[k] = _recursive_apply(replacement, group[k])
  
imports: import abc
  import collections
  import copy
  import math
  import typing
  import warnings
  import torch
  from .None import patch
  from .None import utils
label_desc: Use image node_id 7 for calling a global function with example usage: apply_trainable_opt_params(opt, override) without return types