code: def guess_routine(
      ufunc: cupy.ufunc,
      in_types: Tuple[numpy.dtype, ...],
      dtype: Optional[numpy.dtype],
      mode: str,
  ) -> cupy._core._kernel._Op:
      if dtype is not None:
          return ufunc._ops._guess_routine_from_dtype(dtype)
      can_cast = numpy.can_cast if mode == "numpy" else _cuda_can_cast
      return ufunc._ops._guess_routine_from_in_types(
          tuple(in_types), can_cast
      )
  
file_path: cupy/cupyx/jit/_cuda_typerules.py
imports: import ast
  from typing import Any, Callable, Mapping, Optional, Tuple, Type
  import numpy
  import numpy.typing
  import operator
  import cupy
  from cupy._logic import ops
  from cupy._math import arithmetic
  from cupy._logic import comparison
  from cupy._binary import elementwise
  from cupy import _core
  from cupyx.jit import _cuda_types
label_desc: Use image node_id 5 for calling a global function with example usage: guess_routine(ufunc, in_types, dtype, mode) and returns: ufunc, ufunc