code: def _na_arithmetic_op(
      left: np.ndarray, right, op, is_cmp: bool = False
  ):
      """
      Return the result of evaluating op on the passed in values.
  
      If native types are not compatible, try coercion to object dtype.
  
      Parameters
      ----------
      left : np.ndarray
      right : np.ndarray or scalar
          Excludes DataFrame, Series, Index, ExtensionArray.
      is_cmp : bool, default False
          If this a comparison operation.
  
      Returns
      -------
      array-like
  
      Raises
      ------
      TypeError : invalid operation
      """
      if isinstance(right, str):
          # can never use numexpr
          func = op
      else:
          func = partial(expressions.evaluate, op)
  
      try:
          result = func(left, right)
      except TypeError:
          if not is_cmp and (
              left.dtype == object
              or getattr(right, "dtype", None) == object
          ):
              # For object dtype, fallback to a masked operation (only operating
              #  on the non-missing values)
              # Don't do this for comparisons, as that will handle complex numbers
              #  incorrectly, see GH#32047
              result = _masked_arith_op(left, right, op)
          else:
              raise
  
      if is_cmp and (is_scalar(result) or result is NotImplemented):
          # numpy returned a scalar instead of operating element-wise
          # e.g. numeric array vs str
          # TODO: can remove this after dropping some future numpy version?
          return invalid_comparison(left, right, op)
  
      return missing.dispatch_fill_zeros(op, left, right, result)
  
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 4 for calling a global function with example usage: _na_arithmetic_op(left, right, op, is_cmp) and returns: missing, invalid_comparison