code: def get_allowed_combinations_for_operator(dtype_l, dtype_r, op):
      error = TypeError(
          f"{op} not supported between {dtype_l} and {dtype_r} scalars"
      )
  
      to_numpy_ops = {
          "__add__": _ADD_TYPES,
          "__radd__": _ADD_TYPES,
          "__sub__": _SUB_TYPES,
          "__rsub__": _SUB_TYPES,
          "__mul__": _MUL_TYPES,
          "__rmul__": _MUL_TYPES,
          "__floordiv__": _FLOORDIV_TYPES,
          "__rfloordiv__": _FLOORDIV_TYPES,
          "__truediv__": _TRUEDIV_TYPES,
          "__rtruediv__": _TRUEDIV_TYPES,
          "__mod__": _MOD_TYPES,
          "__rmod__": _MOD_TYPES,
          "__pow__": _POW_TYPES,
          "__rpow__": _POW_TYPES,
      }
      allowed = to_numpy_ops.get(op, op)
  
      # special rules for string
      if dtype_l == "object" or dtype_r == "object":
          if (dtype_l == dtype_r == "object") and op == "__add__":
              return "str"
          else:
              raise error
  
      # Check if we can directly operate
  
      for valid_combo in allowed:
          ltype, rtype, outtype = valid_combo
          if np.can_cast(dtype_l.char, ltype) and np.can_cast(
              dtype_r.char, rtype
          ):
              return outtype
  
      raise error
  
imports: import datetime
  from collections import namedtuple
  from decimal import Decimal
  import cupy
  import numpy
  import pandas
  import pyarrow
  from pandas.core.dtypes.common import infer_dtype_from_object
  import cudf
  from cudf._typing import DtypeObj
  from cudf.api.types import is_bool, is_float, is_integer
label_desc: Use image node_id 19 for calling a global function with example usage: get_allowed_combinations_for_operator(dtype_l, dtype_r, op) and returns: str, outtype