code: def determine_out_dtype(lhs_dtype: Dtype, rhs_dtype: Dtype) -> Dtype:
      if np.can_cast(np.dtype(lhs_dtype), np.dtype(rhs_dtype)):
          return rhs_dtype
      elif np.can_cast(np.dtype(rhs_dtype), np.dtype(lhs_dtype)):
          return lhs_dtype
      else:
          raise TypeError(
              f"Cannot type-cast {lhs_dtype} and {rhs_dtype}"
          )
  
imports: from __future__ import annotations
  import datetime
  from typing import Any, Optional, Sequence, cast
  import numpy
  import pandas
  import pyarrow
  from typing_extensions import Self
  import cudf
  from cudf import _lib
  from cudf._typing import ColumnBinaryOperand, DatetimeLikeScalar, Dtype
  from cudf.api.types import is_scalar, is_timedelta64_dtype
  from cudf.core.buffer import Buffer, acquire_spill_lock
  from cudf.core.column import ColumnBase, column, string
  from cudf.utils.dtypes import np_to_pa_dtype
  from cudf.utils.utils import _all_bools_with_nulls
label_desc: Use image node_id 1 for calling a global function with example usage: determine_out_dtype(lhs_dtype, rhs_dtype) and returns: rhs_dtype, lhs_dtype