code: def test_intersect1d_array_like(self):
      # See gh-11772
      class Test:
          def __array__(self):
              return np.arange(3)
  
      a = Test()
      res = intersect1d(a, a)
      assert_array_equal(res, a)
      res = intersect1d([1, 2, 3], [1, 2, 3])
      assert_array_equal(res, [1, 2, 3])
  
imports: import numpy
  from numpy import ediff1d, intersect1d, setxor1d, union1d, setdiff1d, unique, isin
  from numpy.exceptions import AxisError
  from numpy.testing import assert_array_equal, assert_equal, assert_raises, assert_raises_regex
  import pytest
label_desc: Use image node_id 2 for calling the TestSetOps obj's underlying member method code with example usage: obj.test_intersect1d_array_like() and returns: np