code: def test_array_scalar_like_equivalence(
      data, all_arithmetic_operators
  ):
      data, scalar = data
      op = tm.get_op_from_name(all_arithmetic_operators)
      check_skip(data, all_arithmetic_operators)
  
      scalar_array = pd.array([scalar] * len(data), dtype=data.dtype)
  
      # TODO also add len-1 array (np.array([scalar], dtype=data.dtype.numpy_dtype))
      for scalar in [scalar, data.dtype.type(scalar)]:
          if is_bool_not_implemented(data, all_arithmetic_operators):
              msg = "operator '.*' not implemented for bool dtypes"
              with pytest.raises(NotImplementedError, match=msg):
                  op(data, scalar)
              with pytest.raises(NotImplementedError, match=msg):
                  op(data, scalar_array)
          else:
              result = op(data, scalar)
              expected = op(data, scalar_array)
              tm.assert_extension_array_equal(result, expected)
  
file_path: pandas/pandas/tests/arrays/masked/test_arithmetic.py
imports: from __future__ import annotations
  from typing import Any
  import numpy
  import pytest
  import pandas
  import pandas._testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_array_scalar_like_equivalence(data, all_arithmetic_operators) without return types