code: def python_type_for_torch(dtyp):
      """Get a python scalar type a torch dtype"""
      if dtyp.is_floating_point:
          typ = float
      elif dtyp.is_complex:
          typ = complex
      elif dtyp == torch.bool:
          typ = bool
      else:
          typ = int
      return typ
  
file_path: pytorch/torch/_numpy/_dtypes_impl.py
imports: from collections import namedtuple
  import torch
  from .None import _casting_dicts
label_desc: Use image node_id 5 for calling a global function with example usage: python_type_for_torch(dtyp) and returns: typ