code: def test_register(pm):
      class MyPlugin(object):
          pass
  
      my = MyPlugin()
      pm.register(my)
      assert my in pm.get_plugins()
      my2 = MyPlugin()
      pm.register(my2)
      assert set([my, my2]).issubset(pm.get_plugins())
  
      assert pm.is_registered(my)
      assert pm.is_registered(my2)
      pm.unregister(my)
      assert not pm.is_registered(my)
      assert my not in pm.get_plugins()
  
imports: import pytest
  import types
  from pluggy import PluginManager, PluginValidationError, HookCallError, HookimplMarker, HookspecMarker
  from pluggy.manager import importlib_metadata
label_desc: Use image node_id 9 for calling a global function with example usage: test_register(pm) without return types