code: def test_setup_logging(pytester: Pytester) -> None:
      pytester.makepyfile(
          """
          import logging
  
          logger = logging.getLogger(__name__)
  
          def setup_function(function):
              logger.info('text going to logger from setup')
  
          def test_foo():
              logger.info('text going to logger from call')
              assert False
      """
      )
      result = pytester.runpytest("--log-level=INFO")
      assert result.ret == 1
      result.stdout.fnmatch_lines(
          [
              "*- Captured *log setup -*",
              "*text going to logger from setup*",
              "*- Captured *log call -*",
              "*text going to logger from call*",
          ]
      )
  
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 5 for calling a global function with example usage: test_setup_logging(pytester) without return types