code: def get_typed_class(clazz, dtype_or_object_with_dtype, dtype_map):
      clazz.dtype = extract_dtype(dtype_or_object_with_dtype)
      if np.dtype(clazz.dtype) not in dtype_map:
          raise ValueError(
              "dtype does not exist in type map for {}".format(
                  clazz.__class__.__name__
              )
          )
      return dtype_map[np.dtype(clazz.dtype)]
  
imports: import numpy
  from tick.base import Base
label_desc: Use image node_id 2 for calling a global function with example usage: get_typed_class(clazz, dtype_or_object_with_dtype, dtype_map) and returns: dtype_map