code: def testInfer(self):
      reporter = CLIReporter()
      test_result = dict(
          foo_result=1, baz_result=4123, bar_result="testme"
      )
  
      def test(config):
          for i in range(3):
              train.report(test_result)
  
      analysis = tune.run(test, num_samples=3, verbose=3)
      all_trials = analysis.trials
      inferred_results = reporter._infer_user_metrics(all_trials)
  
      for metric in inferred_results:
          self.assertNotIn(metric, AUTO_RESULT_KEYS)
          self.assertTrue(metric in test_result)
  
      class TestReporter(CLIReporter):
          _output = []
  
          def __init__(self, *args, **kwargs):
              super().__init__(*args, **kwargs)
              self._max_report_freqency = 0
  
          def report(self, *args, **kwargs):
              progress_str = self._progress_str(*args, **kwargs)
              self._output.append(progress_str)
  
      reporter = TestReporter()
      analysis = tune.run(
          test, num_samples=3, progress_reporter=reporter, verbose=3
      )
      found = {k: False for k in test_result}
      for output in reporter._output:
          for key in test_result:
              if key in output:
                  found[key] = True
      assert found["foo_result"]
      assert found["baz_result"]
      assert not found["bar_result"]
  
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 5 for calling the ProgressReporterTest obj's underlying member method code with example usage: obj.testInfer() without return types