code: def arithmetic_op(left: ArrayLike, right: Any, op):
      """
      Evaluate an arithmetic operation `+`, `-`, `*`, `/`, `//`, `%`, `**`, ...
  
      Note: the caller is responsible for ensuring that numpy warnings are
      suppressed (with np.errstate(all="ignore")) if needed.
  
      Parameters
      ----------
      left : np.ndarray or ExtensionArray
      right : object
          Cannot be a DataFrame or Index.  Series is *not* excluded.
      op : {operator.add, operator.sub, ...}
          Or one of the reversed variants from roperator.
  
      Returns
      -------
      ndarray or ExtensionArray
          Or a 2-tuple of these in the case of divmod or rdivmod.
      """
      # NB: We assume that extract_array and ensure_wrapped_if_datetimelike
      #  have already been called on `left` and `right`,
      #  and `maybe_prepare_scalar_for_op` has already been called on `right`
      # We need to special-case datetime64/timedelta64 dtypes (e.g. because numpy
      # casts integer dtypes to timedelta64 when operating with timedelta64 - GH#22390)
  
      if (
          should_extension_dispatch(left, right)
          or isinstance(right, (Timedelta, BaseOffset, Timestamp))
          or right is NaT
      ):
          # Timedelta/Timestamp and other custom scalars are included in the check
          # because numexpr will fail on it, see GH#31457
          res_values = op(left, right)
      else:
          # TODO we should handle EAs consistently and move this check before the if/else
          # (https://github.com/pandas-dev/pandas/issues/41165)
          # error: Argument 2 to "_bool_arith_check" has incompatible type
          # "Union[ExtensionArray, ndarray[Any, Any]]"; expected "ndarray[Any, Any]"
          _bool_arith_check(op, left, right)  # type: ignore[arg-type]
  
          # error: Argument 1 to "_na_arithmetic_op" has incompatible type
          # "Union[ExtensionArray, ndarray[Any, Any]]"; expected "ndarray[Any, Any]"
          res_values = _na_arithmetic_op(left, right, op)  # type: ignore[arg-type]
  
      return res_values
  
imports: from __future__ import annotations
  import datetime
  from functools import partial
  import operator
  from typing import TYPE_CHECKING, Any
  import warnings
  import numpy
  from pandas._libs import NaT, Timedelta, Timestamp, lib, ops
  from pandas._libs.tslibs import BaseOffset, get_supported_dtype, is_supported_dtype, is_unitless
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike, find_common_type
  from pandas.core.dtypes.common import ensure_object, is_bool_dtype, is_list_like, is_numeric_v_string_like, is_object_dtype, is_scalar
  from pandas.core.dtypes.generic import ABCExtensionArray, ABCIndex, ABCSeries
  from pandas.core.dtypes.missing import isna, notna
  from pandas.core import roperator
  from pandas.core.computation import expressions
  from pandas.core.construction import ensure_wrapped_if_datetimelike
  from pandas.core.ops import missing
  from pandas.core.ops.dispatch import should_extension_dispatch
  from pandas.core.ops.invalid import invalid_comparison
label_desc: Use image node_id 5 for calling a global function with example usage: arithmetic_op(left, right, op) and returns: res_values