code: def test_set_blocked(pm):
      class A(object):
          pass
  
      a1 = A()
      name = pm.register(a1)
      assert pm.is_registered(a1)
      assert not pm.is_blocked(name)
      pm.set_blocked(name)
      assert pm.is_blocked(name)
      assert not pm.is_registered(a1)
  
      pm.set_blocked("somename")
      assert pm.is_blocked("somename")
      assert not pm.register(A(), "somename")
      pm.unregister(name="somename")
      assert pm.is_blocked("somename")
  
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 6 for calling a global function with example usage: test_set_blocked(pm) without return types