code: def _dtype(v) -> str:
      if hasattr(v, "dtype"):
          dtype = v.dtype
      elif "dtype" in v.__class__.__name__:
          dtype = v
      else:
          return None
  
      if dtype.__class__.__module__ == "torch":
          # ugly but works
          return str(dtype).replace("torch.", "")
      if (
          hasattr(dtype, "names")
          and dtype.names is not None
          and hasattr(dtype, "fields")
      ):
          # structured dtype: https://numpy.org/devdocs/user/basics.rec.html
          return ",".join(
              [_dtype(val) for val, _ in dtype.fields.values()]
          )
      return dtype.name
  
imports: import os
  import sys
  import traceback
  import inspect
  import hashlib
  from pathlib import Path
  import matplotlib.pyplot
  import tsensor
label_desc: Use image node_id 9 for calling a global function with example usage: _dtype(v) and returns: dtype, str, str, None