code: def test_write_network_text_path_graph():
      graph = nx.path_graph(3, create_using=nx.Graph)
      lines = []
      write = lines.append
      nx.write_network_text(graph, path=write, end="")
      text = "\n".join(lines)
      print(text)
      target = dedent(
          """
          ╙── 0
              └── 1
                  └── 2
          """
      ).strip()
      assert target == text
  
imports: import random
  from itertools import product
  from textwrap import dedent
  import pytest
  import networkx
label_desc: Use image node_id 18 for calling a global function with example usage: test_write_network_text_path_graph() without return types