code: def test_terminal_report_failedfirst(
      self, pytester: Pytester
  ) -> None:
      pytester.makepyfile(
          test_a="""
              def test_a1(): assert 0
              def test_a2(): pass
          """
      )
      result = pytester.runpytest()
      result.stdout.fnmatch_lines(
          ["collected 2 items", "*1 failed, 1 passed in*"]
      )
  
      result = pytester.runpytest("--ff")
      result.stdout.fnmatch_lines(
          [
              "collected 2 items",
              "run-last-failure: rerun previous 1 failure first",
              "*1 failed, 1 passed in*",
          ]
      )
  
imports: import os
  import shutil
  from pathlib import Path
  from typing import Generator
  from typing import List
  import pytest
  from _pytest.config import ExitCode
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import Pytester
  from _pytest.tmpdir import TempPathFactory
label_desc: Use image node_id 9 for calling the TestLastFailed obj's underlying member method code with example usage: obj.test_terminal_report_failedfirst(pytester) without return types