code: def _to_type_desc(input):
      """
      Generate <type> description required by ArithmeticGenericOp for the usage with scalar constants.
      """
      if type(input) is bool:
          return "bool"
      if type(input) is int:
          return "int32"
      if type(input) is float:
          return "float32"  # TODO(klecki): current DALI limitation
      if isinstance(input, _ScalarConstant):
          dtype_to_desc = {
              _DALIDataType.BOOL: "bool",
              _DALIDataType.INT8: "int8",
              _DALIDataType.INT16: "int16",
              _DALIDataType.INT32: "int32",
              _DALIDataType.INT64: "int64",
              _DALIDataType.UINT8: "uint8",
              _DALIDataType.UINT16: "uint16",
              _DALIDataType.UINT32: "uint32",
              _DALIDataType.UINT64: "uint64",
              _DALIDataType.FLOAT16: "float16",
              _DALIDataType.FLOAT: "float32",
              _DALIDataType.FLOAT64: "float64",
          }
          return dtype_to_desc[input.dtype]
  
      raise TypeError(
          f"Constant argument to arithmetic operation not supported. "
          f"Got {str(type(input))}, expected "
          f"a constant value of type 'bool', 'int', 'float' or 'nvidia.dali.types.Constant'."
      )
  
file_path: DALI/dali/python/nvidia/dali/ops/_operators/math.py
imports: from nvidia.dali import _conditionals
  from nvidia.dali.data_node import DataNode
  from nvidia.dali.types import DALIDataType, Constant, ScalarConstant, _bool_types, _int_like_types, _float_types
label_desc: Use image node_id 4 for calling a global function with example usage: _to_type_desc(input) and returns: str, str, str, dtype_to_desc