code: def _arithm_op(name, *inputs):
      """Arithmetic operator function wrapper around ``eager.arithmetic_generic_op``. It is used
      for implementation of eager operators that are injected to TensorLists and for eager math
      operators.
      """
      batch_size = _choose_batch_size(inputs)
      inputs = [
          _Classification(
              input, f"Input {i}", arg_constant_len=batch_size
          ).data
          for i, input in enumerate(inputs)
      ]
      categories_idxs, inputs, integers, reals = _ops._group_inputs(
          inputs,
          edge_type=(_tensors.TensorListCPU, _tensors.TensorListGPU),
      )
      input_desc = _ops._generate_input_desc(
          categories_idxs, integers, reals
      )
  
      if any(
          isinstance(input, _tensors.TensorListGPU) for input in inputs
      ):
          device = "gpu"
      else:
          device = "cpu"
  
      if device == "gpu":
          inputs = list(
              input._as_gpu()
              if isinstance(input, _tensors.TensorListCPU)
              else input
              for input in inputs
          )
  
      init_args = {
          "device": device,
          "expression_desc": f"{name}({input_desc})",
          "integer_constants": integers,
          "real_constants": reals,
      }
  
      from nvidia.dali.experimental.eager import arithmetic_generic_op
  
      return arithmetic_generic_op(*inputs, **init_args)
  
imports: import sys
  from nvidia.dali import backend
  from nvidia.dali import internal
  from nvidia.dali import ops
  from nvidia.dali import tensors
  from nvidia.dali import types
  from nvidia.dali.external_source import _prep_data_for_feed_input
label_desc: Use image node_id 3 for calling a global function with example usage: _arithm_op(name) and returns: arithmetic_generic_op