code: def test_set_blocked(pm: PluginManager) -> None:
      class A:
          pass
  
      a1 = A()
      name = pm.register(a1)
      assert name is not None
      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 sys
  from typing import Any
  from typing import List
  import pytest
  from pluggy import HookCallError
  from pluggy import HookimplMarker
  from pluggy import HookspecMarker
  from pluggy import PluginManager
  from pluggy import PluginValidationError
label_desc: Use image node_id 6 for calling a global function with example usage: test_set_blocked(pm) without return types