code: def test_register(obj, registrar):
      if dd._dask_expr_enabled() and obj is dd.Index:
          pytest.skip("from_pandas doesn't support Index")
      with ensure_removed(obj, "mine"):
          before = set(dir(obj))
          registrar("mine")(MyAccessor)
          instance = dd.from_pandas(
              obj._partition_type([], dtype=float), 2
          )
          assert instance.mine.prop == "item"
          after = set(dir(obj))
          assert (before ^ after) == {"mine"}
          assert "mine" in obj._accessors
  
imports: from __future__ import annotations
  import contextlib
  import numpy
  import pytest
  import dask.dataframe
  from dask.dataframe._compat import PANDAS_GE_140, PANDAS_GE_210
  from dask.dataframe._pyarrow import to_pyarrow_string
  from dask.dataframe.utils import assert_eq, pyarrow_strings_enabled
label_desc: Use image node_id 2 for calling a global function with example usage: test_register(obj, registrar) without return types