code: def test_spinner_render():
      time = 0.0
  
      def get_time():
          nonlocal time
          return time
  
      console = Console(
          width=80,
          color_system=None,
          force_terminal=True,
          get_time=get_time,
      )
      console.begin_capture()
      spinner = Spinner("dots", "Foo")
      console.print(spinner)
      time += 80 / 1000
      console.print(spinner)
      result = console.end_capture()
      print(repr(result))
      expected = "⠋ Foo\n⠙ Foo\n"
      assert result == expected
  
file_path: rich/tests/test_spinner.py
imports: import pytest
  from rich.console import Console
  from rich.measure import Measurement
  from rich.rule import Rule
  from rich.spinner import Spinner
  from rich.text import Text
label_desc: Use image node_id 2 for calling a global function with example usage: test_spinner_render() and returns: time