code: def test_render_single_branch():
      tree = Tree("foo")
      tree.add("bar")
      console = Console(color_system=None, width=20)
      console.begin_capture()
      console.print(tree)
      result = console.end_capture()
      print(repr(result))
      expected = "foo\n└── bar\n"
      assert result == expected
  
file_path: rich/tests/test_tree.py
imports: import sys
  import pytest
  from rich.console import Console
  from rich.measure import Measurement
  from rich.tree import Tree
label_desc: Use image node_id 2 for calling a global function with example usage: test_render_single_branch() without return types