code: def test_singularity():
      x = Symbol("x")
      lines = [
          "     54 | .                                                     ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "   27.5 |--.----------------------------------------------------",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "        |   .                                                   ",
          "        |    \\                                                  ",
          "        |     \\                                                 ",
          "        |      ..                                               ",
          "        |        ...                                            ",
          "        |           .............                               ",
          "      1 |_______________________________________________________",
          "         0                          0.5                        1",
      ]
      assert lines == list(textplot_str(1 / x, 0, 1))
  
      lines = [
          "      0 |                                                 ......",
          "        |                                         ........      ",
          "        |                                 ........              ",
          "        |                           ......                      ",
          "        |                      .....                            ",
          "        |                  ....                                 ",
          "        |               ...                                     ",
          "        |             ..                                        ",
          "        |          ...                                          ",
          "        |         /                                             ",
          "     -2 |-------..----------------------------------------------",
          "        |      /                                                ",
          "        |     /                                                 ",
          "        |    /                                                  ",
          "        |   .                                                   ",
          "        |                                                       ",
          "        |  .                                                    ",
          "        |                                                       ",
          "        |                                                       ",
          "        |                                                       ",
          "     -4 |_______________________________________________________",
          "         0                          0.5                        1",
      ]
      # RuntimeWarning: divide by zero encountered in log
      with ignore_warnings(RuntimeWarning):
          assert lines == list(textplot_str(log(x), 0, 1))
  
file_path: sympy/sympy/plotting/tests/test_textplot.py
imports: from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.functions.elementary.exponential import log
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.trigonometric import sin
  from sympy.plotting.textplot import textplot_str
  from sympy.utilities.exceptions import ignore_warnings
label_desc: Use image node_id 2 for calling a global function with example usage: test_singularity() without return types