code: def _check_divmod_op(self, ser: pd.Series, op, other):
      # check that divmod behavior matches behavior of floordiv+mod
      if op is divmod:
          exc = self._get_expected_exception("__divmod__", ser, other)
      else:
          exc = self._get_expected_exception("__rdivmod__", ser, other)
      if exc is None:
          result_div, result_mod = op(ser, other)
          if op is divmod:
              expected_div, expected_mod = ser // other, ser % other
          else:
              expected_div, expected_mod = other // ser, other % ser
          tm.assert_series_equal(result_div, expected_div)
          tm.assert_series_equal(result_mod, expected_mod)
      else:
          with pytest.raises(exc):
              divmod(ser, other)
  
imports: from __future__ import annotations
  from typing import final
  import numpy
  import pytest
  from pandas._config import using_pyarrow_string_dtype
  from pandas.core.dtypes.common import is_string_dtype
  import pandas
  import pandas._testing
  from pandas.core import ops
label_desc: Use image node_id 7 for calling the BaseOpsUtil obj's underlying member method code with example usage: obj._check_divmod_op(ser, op, other) without return types