code: def testProgressStr(self):
      trials = []
      for i in range(5):
          t = Mock()
          if i == 0:
              t.status = "TERMINATED"
          elif i == 1:
              t.status = "PENDING"
          else:
              t.status = "RUNNING"
          t.trial_id = "%05d" % i
          t.local_experiment_path = "/foo"
          t.temporary_state = Mock()
          t.temporary_state.location = "here"
          t.config = {"a": i, "b": i * 2, "n": {"k": [i, 2 * i]}}
          t.evaluated_params = {
              "a": i,
              "b": i * 2,
              "n/k/0": i,
              "n/k/1": 2 * i,
          }
          t.last_result = {
              "config": {"a": i, "b": i * 2, "n": {"k": [i, 2 * i]}},
              "metric_1": i / 2,
              "metric_2": i / 4,
              "nested": {"sub": i / 2},
          }
          t.__str__ = lambda self: self.trial_id
          trials.append(t)
      # One metric, two parameters
      prog1 = _trial_progress_str(
          trials,
          ["metric_1"],
          ["a", "b"],
          fmt="psql",
          max_rows=3,
          force_table=True,
      )
      print(prog1)
      assert prog1 == EXPECTED_RESULT_1
  
      # No metric, all parameters
      prog2 = _trial_progress_str(
          trials, [], None, fmt="psql", max_rows=None, force_table=True
      )
      print(prog2)
      assert prog2 == EXPECTED_RESULT_2
  
      # Two metrics, one parameter, all with custom representation
      prog3 = _trial_progress_str(
          trials,
          {"nested/sub": "NestSub", "metric_2": "Metric 2"},
          {"a": "A"},
          fmt="psql",
          max_rows=3,
          force_table=True,
      )
      print(prog3)
      assert prog3 == EXPECTED_RESULT_3
  
      # Current best trial
      best1 = _best_trial_str(trials[1], "metric_1")
      assert best1 == EXPECTED_BEST_1
  
imports: import collections
  import os
  import regex
  import unittest
  from unittest.mock import MagicMock, Mock, patch
  import pytest
  import numpy
  from ray import train, tune
  from ray._private.test_utils import run_string_as_driver
  from ray.tune.progress_reporter import CLIReporter, JupyterNotebookReporter, ProgressReporter, _fair_filter_trials, _best_trial_str, _detect_reporter, _time_passed_str, _trial_progress_str, TuneReporterBase, _max_len
  from ray.tune.result import AUTO_RESULT_KEYS
  from ray.tune.experiment.trial import Trial
label_desc: Use image node_id 6 for calling the ProgressReporterTest obj's underlying member method code with example usage: obj.testProgressStr() without return types