code: def test_process_doc_handle_table_title():
      env = mock.Mock(domaindata={})
      env.app.registry.enumerable_nodes = {}
      table_node = nodes.table(
          "",
          nodes.title("title text", "title text"),
      )
      document = mock.Mock(
          nametypes={"testname": True},
          nameids={"testname": "testid"},
          ids={"testid": table_node},
          citation_refs={},
      )
      document.findall.return_value = []
  
      domain = StandardDomain(env)
      if "testname" in domain.data["labels"]:
          del domain.data["labels"]["testname"]
      domain.process_doc(env, "testdoc", document)
      assert "testname" in domain.data["labels"]
      assert domain.data["labels"]["testname"] == (
          "testdoc",
          "testid",
          "title text",
      )
  
imports: from unittest import mock
  import pytest
  from docutils import nodes
  from docutils.nodes import definition, definition_list, definition_list_item, term
  from html5lib import HTMLParser
  from sphinx import addnodes
  from sphinx.addnodes import desc, desc_addname, desc_content, desc_name, desc_signature, glossary, index, pending_xref
  from sphinx.domains.std import StandardDomain
  from sphinx.testing import restructuredtext
  from sphinx.testing.util import assert_node
label_desc: Use image node_id 2 for calling a global function with example usage: test_process_doc_handle_table_title() without return types