code: def get_sum_dtype(dtype):
      """Mimic numpy's casting for np.sum"""
      if dtype.kind == "u" and np.can_cast(dtype, np.uint):
          return np.uint
      if np.can_cast(dtype, np.int_):
          return np.int_
      return dtype
  
imports: import sys
  import operator
  import warnings
  import numpy
  from scipy._lib._util import prod
label_desc: Use image node_id 9 for calling a global function with example usage: get_sum_dtype(dtype) and returns: dtype, np, np