code: def find_result_type(left: ArrayLike, right: Any) -> DtypeObj:
      """
      Find the type/dtype for a the result of an operation between these objects.
  
      This is similar to find_common_type, but looks at the objects instead
      of just their dtypes. This can be useful in particular when one of the
      objects does not have a `dtype`.
  
      Parameters
      ----------
      left : np.ndarray or ExtensionArray
      right : Any
  
      Returns
      -------
      np.dtype or ExtensionDtype
  
      See also
      --------
      find_common_type
      numpy.result_type
      """
      new_dtype: DtypeObj
  
      if (
          isinstance(left, np.ndarray)
          and left.dtype.kind in ["i", "u", "c"]
          and (lib.is_integer(right) or lib.is_float(right))
      ):
          # e.g. with int8 dtype and right=512, we want to end up with
          # np.int16, whereas infer_dtype_from(512) gives np.int64,
          #  which will make us upcast too far.
          if (
              lib.is_float(right)
              and right.is_integer()
              and left.dtype.kind != "f"
          ):
              right = int(right)
  
          new_dtype = np.result_type(left, right)
  
      elif is_valid_na_for_dtype(right, left.dtype):
          # e.g. IntervalDtype[int] and None/np.nan
          new_dtype = ensure_dtype_can_hold_na(left.dtype)
  
      else:
          dtype, _ = infer_dtype_from(right, pandas_dtype=True)
  
          new_dtype = find_common_type([left.dtype, dtype])
  
      return new_dtype
  
imports: from __future__ import annotations
  import datetime
  import functools
  from typing import TYPE_CHECKING, Any, Literal, Sized, TypeVar, cast, overload
  import warnings
  import numpy
  from pandas._libs import lib
  from pandas._libs.missing import NA, NAType, checknull
  from pandas._libs.tslibs import NaT, OutOfBoundsDatetime, OutOfBoundsTimedelta, Timedelta, Timestamp, get_unit_from_dtype, is_supported_unit
  from pandas._libs.tslibs.timedeltas import array_to_timedelta64
  from pandas._typing import ArrayLike, Dtype, DtypeObj, NumpyIndexT, Scalar, npt
  from pandas.errors import IntCastingNaNError, LossySetitemError
  from pandas.core.dtypes.common import ensure_int8, ensure_int16, ensure_int32, ensure_int64, ensure_object, ensure_str, is_bool, is_bool_dtype, is_complex, is_complex_dtype, is_datetime64_dtype, is_extension_array_dtype, is_float, is_float_dtype, is_integer, is_integer_dtype, is_numeric_dtype, is_object_dtype, is_scalar, is_signed_integer_dtype, is_string_dtype, is_timedelta64_dtype, is_unsigned_integer_dtype, pandas_dtype
  from pandas.core.dtypes.dtypes import BaseMaskedDtype, CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, PandasExtensionDtype, PeriodDtype
  from pandas.core.dtypes.generic import ABCExtensionArray, ABCIndex, ABCSeries
  from pandas.core.dtypes.inference import is_list_like
  from pandas.core.dtypes.missing import is_valid_na_for_dtype, isna, na_value_for_dtype, notna
  from pandas.io._util import _arrow_dtype_mapping
label_desc: Use image node_id 34 for calling a global function with example usage: find_result_type(left, right) and returns: new_dtype