code: def test_accessors():
      class SubTestObject:
          attr_obj = 1
          attr_char = 2
  
      class TestObject:
          basic_attr = 1
          begin_end = [1, 2, 3]
          d = {"operator[object]": 1, "operator[char *]": 2}
          sub = SubTestObject()
  
          def func(self, x, *args):
              return self.basic_attr + x + sum(args)
  
      d = m.accessor_api(TestObject())
      assert d["basic_attr"] == 1
      assert d["begin_end"] == [1, 2, 3]
      assert d["operator[object]"] == 1
      assert d["operator[char *]"] == 2
      assert d["attr(object)"] == 1
      assert d["attr(char *)"] == 2
      assert d["missing_attr_ptr"] == "raised"
      assert d["missing_attr_chain"] == "raised"
      assert d["is_none"] is False
      assert d["operator()"] == 2
      assert d["operator*"] == 7
      assert d["implicit_list"] == [1, 2, 3]
      assert all(x in TestObject.__dict__ for x in d["implicit_dict"])
  
      assert m.tuple_accessor(tuple()) == (0, 1, 2)
  
      d = m.accessor_assignment()
      assert d["get"] == 0
      assert d["deferred_get"] == 0
      assert d["set"] == 1
      assert d["deferred_set"] == 1
      assert d["var"] == 99
  
imports: import contextlib
  import sys
  import types
  import pytest
  import env
  from pybind11_tests import detailed_error_messages_enabled
  from pybind11_tests import pytypes
label_desc: Use image node_id 22 for calling a global function with example usage: test_accessors() and returns: unknown