code: def test_scalar(self, other, comparison_op, dtype):
      op = comparison_op
      left = pd.array([1, 0, None], dtype=dtype)
  
      result = op(left, other)
  
      if other is pd.NA:
          expected = pd.array([None, None, None], dtype="boolean")
      else:
          values = op(left._data, other)
          expected = pd.arrays.BooleanArray(
              values, left._mask, copy=True
          )
      tm.assert_extension_array_equal(result, expected)
  
      # ensure we haven't mutated anything inplace
      result[0] = pd.NA
      tm.assert_extension_array_equal(
          left, pd.array([1, 0, None], dtype=dtype)
      )
  
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 2 for calling the ComparisonOps obj's underlying member method code with example usage: obj.test_scalar(other, comparison_op, dtype) without return types