code: def assert_outcomes(
      outcomes: Dict[str, int],
      passed: int = 0,
      skipped: int = 0,
      failed: int = 0,
      errors: int = 0,
      xpassed: int = 0,
      xfailed: int = 0,
      warnings: Optional[int] = None,
      deselected: Optional[int] = None,
  ) -> None:
      """Assert that the specified outcomes appear with the respective
      numbers (0 means it didn't occur) in the text output from a test run.
      """
      __tracebackhide__ = True
  
      obtained = {
          "passed": outcomes.get("passed", 0),
          "skipped": outcomes.get("skipped", 0),
          "failed": outcomes.get("failed", 0),
          "errors": outcomes.get("errors", 0),
          "xpassed": outcomes.get("xpassed", 0),
          "xfailed": outcomes.get("xfailed", 0),
      }
      expected = {
          "passed": passed,
          "skipped": skipped,
          "failed": failed,
          "errors": errors,
          "xpassed": xpassed,
          "xfailed": xfailed,
      }
      if warnings is not None:
          obtained["warnings"] = outcomes.get("warnings", 0)
          expected["warnings"] = warnings
      if deselected is not None:
          obtained["deselected"] = outcomes.get("deselected", 0)
          expected["deselected"] = deselected
      assert obtained == expected
  
file_path: catboost/contrib/python/pytest/py3/_pytest/pytester_assertions.py
imports: from typing import Dict
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  from typing import Union
  from _pytest.reports import CollectReport
  from _pytest.reports import TestReport
label_desc: Use image node_id 2 for calling a global function with example usage: assert_outcomes(outcomes, passed, skipped, failed, errors, xpassed, xfailed, warnings, deselected) without return types