code: def _compare_other(self, data, op, other):
      # array
      result = pd.Series(op(data, other))
      expected = pd.Series(op(data._data, other), dtype="boolean")
  
      # fill the nan locations
      expected[data._mask] = pd.NA
  
      tm.assert_series_equal(result, expected)
  
      # series
      ser = pd.Series(data)
      result = op(ser, other)
  
      # Set nullable dtype here to avoid upcasting when setting to pd.NA below
      expected = op(pd.Series(data._data), other).astype("boolean")
  
      # fill the nan locations
      expected[data._mask] = pd.NA
  
      tm.assert_series_equal(result, expected)
  
file_path: pandas/pandas/tests/arrays/masked_shared.py
imports: import numpy
  import pytest
  import pandas
  import pandas._testing
  from pandas.tests.extension.base import BaseOpsUtil
label_desc: Use image node_id 1 for calling the ComparisonOps obj's underlying member method code with example usage: obj._compare_other(data, op, other) without return types