code: def _inject_cond(self, batch: tensor_dict_type) -> tensor_dict_type:
      if self.cond is None:
          return batch
      batch = shallow_copy_dict(batch)
      batch[INPUT_KEY] = self.cond(
          batch[INPUT_KEY], batch.get(LABEL_KEY)
      )
      return batch
  
imports: from torch import Tensor
  from typing import Any
  from typing import Dict
  from typing import Type
  from typing import Optional
  from cftool.misc import safe_execute
  from cftool.misc import print_warning
  from cftool.misc import shallow_copy_dict
  from cftool.misc import WithRegister
  from cftool.types import tensor_dict_type
  from ....schema import _forward
  from ....schema import TrainerState
  from ....constants import INPUT_KEY
  from ....constants import LABEL_KEY
  from ....constants import PREDICTIONS_KEY
  from ....misc.toolkit import interpolate
  from ....misc.toolkit import auto_num_layers
  from ....modules.blocks import ChannelPadding
label_desc: Use image node_id 2 for calling the DecoderMixin obj's underlying member method code with example usage: obj._inject_cond(batch) and returns: batch, batch