code: def test_end_to_end(self):
      generate2.MIN_NUM_FILES_EXPECTED = 1
      output_dir = pathlib.Path(googletest.GetTempDir()) / "output"
      if os.path.exists(output_dir):
          shutil.rmtree(output_dir)
      os.makedirs(output_dir)
      generate2.build_docs(
          output_dir=output_dir,
          code_url_prefix="",
          search_hints=True,
      )
  
      raw_ops_page = (output_dir / "tf/raw_ops.md").read_text()
      self.assertIn("/tf/raw_ops/Add.md", raw_ops_page)
  
      toc = yaml.safe_load((output_dir / "tf/_toc.yaml").read_text())
      self.assertEqual(
          {"title": "Overview", "path": "/tf_overview"},
          toc["toc"][0]["section"][0],
      )
      redirects = yaml.safe_load(
          (output_dir / "tf/_redirects.yaml").read_text()
      )
      self.assertIn(
          {"from": "/tf_overview", "to": "/tf"}, redirects["redirects"]
      )
  
      if version.parse(fake_tf.__version__) >= version.parse("2.14"):
          self.assertIn(
              '<a id=Add href="/tf/raw_ops/Add.md">Add</a> | ✔️ | ✔️ |',
              raw_ops_page,
          )
          self.assertIn(
              '<a id=Print href="/tf/raw_ops/Print.md">Print</a> | ✔️ | ❌ |',
              raw_ops_page,
          )
  
file_path: tensorflow-upstream/tensorflow/tools/docs/generate2_test.py
imports: import os
  import pathlib
  import shutil
  import types
  from unittest import mock
  from packaging import version
  import tensorflow
  from tensorflow import estimator
  import yaml
  from tensorflow.python.platform import googletest
  from tensorflow.tools.docs import generate2
label_desc: Use image node_id 1 for calling the Generate2Test obj's underlying member method code with example usage: obj.test_end_to_end() without return types