code: def test_progress_max_refresh() -> None:
      """Test max_refresh argument."""
      time = 0.0
  
      def get_time() -> float:
          nonlocal time
          try:
              return time
          finally:
              time = time + 1.0
  
      console = Console(
          color_system=None,
          width=80,
          legacy_windows=False,
          force_terminal=True,
          _environ={},
      )
      column = TextColumn("{task.description}")
      column.max_refresh = 3
      progress = Progress(
          column,
          get_time=get_time,
          auto_refresh=False,
          console=console,
      )
      console.begin_capture()
      with progress:
          task_id = progress.add_task("start")
          for tick in range(6):
              progress.update(task_id, description=f"tick {tick}")
              progress.refresh()
      result = console.end_capture()
      print(repr(result))
      assert (
          result
          == "\x1b[?25l\r\x1b[2Kstart\r\x1b[2Kstart\r\x1b[2Ktick 1\r\x1b[2Ktick 1\r\x1b[2Ktick 3\r\x1b[2Ktick 3\r\x1b[2Ktick 5\r\x1b[2Ktick 5\n\x1b[?25h"
      )
  
imports: import io
  import os
  import tempfile
  from types import SimpleNamespace
  import pytest
  import rich.progress
  from rich.console import Console
  from rich.highlighter import NullHighlighter
  from rich.progress import BarColumn, DownloadColumn, FileSizeColumn, MofNCompleteColumn, Progress, RenderableColumn, SpinnerColumn, Task, TaskID, TaskProgressColumn, TextColumn, TimeElapsedColumn, TimeRemainingColumn, TotalFileSizeColumn, TransferSpeedColumn, _TrackThread, track
  from rich.progress_bar import ProgressBar
  from rich.text import Text
label_desc: Use image node_id 28 for calling a global function with example usage: test_progress_max_refresh() and returns: time