code: def test_register_node():
      class custom_node(nodes.Element):
          pass
  
      with docutils_namespace():
          register_node(custom_node)
  
          # check registered
          assert hasattr(nodes.GenericNodeVisitor, "visit_custom_node")
          assert hasattr(nodes.GenericNodeVisitor, "depart_custom_node")
          assert hasattr(nodes.SparseNodeVisitor, "visit_custom_node")
          assert hasattr(nodes.SparseNodeVisitor, "depart_custom_node")
  
      # check unregistered outside namespace
      assert not hasattr(nodes.GenericNodeVisitor, "visit_custom_node")
      assert not hasattr(nodes.GenericNodeVisitor, "depart_custom_node")
      assert not hasattr(nodes.SparseNodeVisitor, "visit_custom_node")
      assert not hasattr(nodes.SparseNodeVisitor, "depart_custom_node")
  
imports: import os
  from docutils import nodes
  from sphinx.util.docutils import SphinxFileOutput, SphinxTranslator, docutils_namespace, new_document, register_node
label_desc: Use image node_id 1 for calling a global function with example usage: test_register_node() without return types