code: def upcast(*args):
      """Returns the nearest supported sparse dtype for the
      combination of one or more types.
  
      upcast(t0, t1, ..., tn) -> T  where T is a supported dtype
  
      Examples
      --------
  
      >>> upcast('int32')
      <type 'numpy.int32'>
      >>> upcast('bool')
      <type 'numpy.bool_'>
      >>> upcast('int32','float32')
      <type 'numpy.float64'>
      >>> upcast('bool',complex,float)
      <type 'numpy.complex128'>
  
      """
  
      t = _upcast_memo.get(hash(args))
      if t is not None:
          return t
  
      upcast = np.find_common_type(args, [])
  
      for t in supported_dtypes:
          if np.can_cast(upcast, t):
              _upcast_memo[hash(args)] = t
              return t
  
      raise TypeError("no supported conversion for types: %r" % (args,))
  
imports: import sys
  import operator
  import warnings
  import numpy
  from scipy._lib._util import prod
label_desc: Use image node_id 1 for calling a global function with example usage: upcast() and returns: t, t