code: def test_log_in_runtest_logreport(pytester: Pytester) -> None:
      log_file = str(pytester.path.joinpath("pytest.log"))
  
      pytester.makeini(
          """
          [pytest]
          log_file={}
          log_file_level = INFO
          log_cli=true
          """.format(
              log_file
          )
      )
      pytester.makeconftest(
          """
          import logging
          logger = logging.getLogger(__name__)
  
          def pytest_runtest_logreport(report):
              logger.info("logreport")
      """
      )
      pytester.makepyfile(
          """
              def test_first():
                  assert True
          """
      )
      pytester.runpytest()
      with open(log_file, encoding="utf-8") as rfh:
          contents = rfh.read()
          assert contents.count("logreport") == 3
  
imports: import io
  import os
  import re
  from typing import cast
  import pytest
  from _pytest.capture import CaptureManager
  from _pytest.config import ExitCode
  from _pytest.fixtures import FixtureRequest
  from _pytest.pytester import Pytester
  from _pytest.terminal import TerminalReporter
label_desc: Use image node_id 27 for calling a global function with example usage: test_log_in_runtest_logreport(pytester) without return types