code: def test_accessor_works():
      with ensure_removed(pd.Series, "mine"):
          pd.api.extensions.register_series_accessor("mine")(MyAccessor)
  
          s = pd.Series([1, 2])
          assert s.mine.obj is s
  
          assert s.mine.prop == "item"
          assert s.mine.method() == "item"
  
file_path: pandas/pandas/tests/test_register_accessor.py
imports: from collections.abc import Generator
  import contextlib
  import pytest
  import pandas
  import pandas._testing
  from pandas.core import accessor
label_desc: Use image node_id 4 for calling a global function with example usage: test_accessor_works() without return types