code: def test_heading():
      env = Environment()
      env.extend(language=None)
  
      assert heading(env, "Hello") == ("Hello\n" "=====")
      assert heading(env, "Hello", 1) == ("Hello\n" "=====")
      assert heading(env, "Hello", 2) == ("Hello\n" "-----")
      assert heading(env, "Hello", 3) == ("Hello\n" "~~~~~")
      assert heading(env, "русский язык", 1) == (
          "русский язык\n" "============"
      )
  
      # language=ja: ambiguous
      env.language = "ja"
      assert heading(env, "русский язык", 1) == (
          "русский язык\n" "======================="
      )
  
file_path: sphinx/tests/test_util/test_util_rst.py
imports: from docutils.statemachine import StringList
  from jinja2 import Environment
  from sphinx.util.rst import append_epilog, escape, heading, prepend_prolog, textwidth
label_desc: Use image node_id 10 for calling a global function with example usage: test_heading() without return types