code: def _type_name_convert_to_string(dtype, allow_tensors):
      if dtype in _known_types:
          type_name = _known_types[dtype][0]
          if dtype in _enum_types:
              type_name = f":class:`{type_name}`"
          ret = type_name
          if dtype in _vector_types:
              ret += " or list of " + type_name
          if allow_tensors:
              ret += " or TensorList of " + type_name
          return ret
      else:
          raise RuntimeError(
              str(dtype) + " does not correspond to a known type."
          )
  
imports: from enum import Enum, unique
  import re
  from nvidia.dali._backend_enums import DALIDataType, DALIImageType, DALIInterpType
  from nvidia.dali.backend_impl.types import *
label_desc: Use image node_id 3 for calling a global function with example usage: _type_name_convert_to_string(dtype, allow_tensors) and returns: ret