code: def test_has_plugin(pm):
      class A(object):
          pass
  
      a1 = A()
      pm.register(a1, "hello")
      assert pm.is_registered(a1)
      assert pm.has_plugin("hello")
  
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 3 for calling a global function with example usage: test_has_plugin(pm) without return types