code: def test_register(obj, registrar):
      with ensure_removed(obj, "mine"):
          before = set(dir(obj))
          registrar("mine")(MyAccessor)
          o = obj([]) if obj is not pd.Series else obj([], dtype=object)
          assert o.mine.prop == "item"
          after = set(dir(obj))
          assert (before ^ after) == {"mine"}
          assert "mine" in obj._accessors
  
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 3 for calling a global function with example usage: test_register(obj, registrar) without return types