code: def test_create_single_index(app):
      text = (
          ".. index:: docutils\n"
          ".. index:: Python\n"
          ".. index:: pip; install\n"
          ".. index:: pip; upgrade\n"
          ".. index:: Sphinx\n"
          ".. index:: Ель\n"
          ".. index:: ёлка\n"
          ".. index:: \N{RIGHT-TO-LEFT MARK}\u05e2\u05d1\u05e8\u05d9\u05ea\N{LEFT-TO-RIGHT MARK}\n"
          ".. index:: 9-symbol\n"
          ".. index:: &-symbol\n"
          ".. index:: £100\n"
      )
      restructuredtext.parse(app, text)
      index = IndexEntries(app.env).create_index(app.builder)
      assert len(index) == 6
      assert index[0] == (
          "Symbols",
          [
              ("&-symbol", [[("", "#index-9")], [], None]),
              ("9-symbol", [[("", "#index-8")], [], None]),
              ("£100", [[("", "#index-10")], [], None]),
          ],
      )
      assert index[1] == (
          "D",
          [("docutils", [[("", "#index-0")], [], None])],
      )
      assert index[2] == (
          "P",
          [
              (
                  "pip",
                  [
                      [],
                      [
                          ("install", [("", "#index-2")]),
                          ("upgrade", [("", "#index-3")]),
                      ],
                      None,
                  ],
              ),
              ("Python", [[("", "#index-1")], [], None]),
          ],
      )
      assert index[3] == (
          "S",
          [("Sphinx", [[("", "#index-4")], [], None])],
      )
      assert index[4] == (
          "Е",
          [
              ("ёлка", [[("", "#index-6")], [], None]),
              ("Ель", [[("", "#index-5")], [], None]),
          ],
      )
      # Here the word starts with U+200F RIGHT-TO-LEFT MARK, which should be
      # ignored when getting the first letter.
      assert index[5] == (
          "\u05e2",
          [
              (
                  "\N{RIGHT-TO-LEFT MARK}\u05e2\u05d1\u05e8\u05d9\u05ea\N{LEFT-TO-RIGHT MARK}",
                  [[("", "#index-7")], [], None],
              )
          ],
      )
  
file_path: sphinx/tests/test_environment/test_environment_indexentries.py
imports: import pytest
  from sphinx.environment.adapters.indexentries import IndexEntries
  from sphinx.testing import restructuredtext
label_desc: Use image node_id 1 for calling a global function with example usage: test_create_single_index(app) without return types