docstr: Test that the report method works. Assuming we have two issue managers, each should add
  their section to the report.
docstr_tok: ["Test","that","the","report","method","works",".","Assuming","we","have","two","issue","managers",",","each","should","add","their","section","to","the","report","."]
code: def test_get_report(
      self, reporter, data_issues, include_description, monkeypatch
  ):
      """Test that the report method works. Assuming we have two issue managers, each should add
      their section to the report."""
  
      mock_issue_manager = Mock()
      mock_issue_manager.issue_name = "foo"
      mock_issue_manager.report.return_value = "foo report"
  
      class MockIssueManagerFactory:
          @staticmethod
          def from_str(*args, **kwargs):
              return mock_issue_manager
  
      monkeypatch.setattr(
          "cleanlab.datalab.internal.report._IssueManagerFactory",
          MockIssueManagerFactory,
      )
      mock_issues = pd.DataFrame(
          {
              "is_foo_issue": [False, True, False, False, False],
              "foo_score": [0.6, 0.2, 0.7, 0.7, 0.8],
          }
      )
      monkeypatch.setattr(data_issues, "issues", mock_issues)
  
      mock_issue_summary = pd.DataFrame(
          {
              "issue_type": ["foo"],
              "score": [0.6],
              "num_issues": [1],
          }
      )
  
      mock_info = {"foo": {"bar": "baz"}}
  
      monkeypatch.setattr(
          data_issues, "issue_summary", mock_issue_summary
      )
  
      reporter = Reporter(
          data_issues=data_issues,
          task="classification",
          verbosity=0,
          include_description=include_description,
      )
      monkeypatch.setattr(
          data_issues, "issues", mock_issues, raising=False
      )
      monkeypatch.setattr(data_issues, "info", mock_info, raising=False)
  
      monkeypatch.setattr(
          reporter,
          "_write_summary",
          lambda *args, **kwargs: "Here is a lab summary\n\n",
      )
      report = reporter.get_report(num_examples=3)
      expected_report = "\n\n".join(
          ["Here is a lab summary", "foo report"]
      )
      assert report == expected_report
  
file_path: cleanlab/tests/datalab/test_report.py
imports: from unittest.mock import Mock, patch
  import numpy
  import pandas
  import pytest
  from cleanlab import Datalab
  from cleanlab.datalab.internal.report import Reporter
label_desc: Use image node_id 6 for calling the TestReporter obj's underlying member method code with example usage: obj.test_get_report(reporter, data_issues, include_description, monkeypatch) and returns: mock_issue_manager