code: def get_default_dtype_for(dtype):
      """Default scalar type given sctype category."""
      if dtype == torch.bool:
          return dtype
      if dtype.is_complex:
          return default_dtypes().complex_dtype
      if dtype.is_floating_point:
          return default_dtypes().float_dtype
      # else, it must be (some) integer
      return default_dtypes().int_dtype
  
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 2 for calling a global function with example usage: get_default_dtype_for(dtype) and returns: default_dtypes, dtype, default_dtypes, default_dtypes