code: def test_pdbcls_via_local_module(pytester: Pytester) -> None:
      """It should be imported in pytest_configure or later only."""
      p1 = pytester.makepyfile(
          """
          def test():
              print("before_set_trace")
              __import__("pdb").set_trace()
          """,
          mypdb="""
          class Wrapped:
              class MyPdb:
                  def set_trace(self, *args):
                      print("set_trace_called", args)
  
                  def runcall(self, *args, **kwds):
                      print("runcall_called", args, kwds)
          """,
      )
      result = pytester.runpytest(
          str(p1), "--pdbcls=really.invalid:Value", syspathinsert=True
      )
      result.stdout.fnmatch_lines(
          [
              "*= FAILURES =*",
              "E * --pdbcls: could not import 'really.invalid:Value': No module named *really*",
          ]
      )
      assert result.ret == 1
  
      result = pytester.runpytest(
          str(p1), "--pdbcls=mypdb:Wrapped.MyPdb", syspathinsert=True
      )
      assert result.ret == 0
      result.stdout.fnmatch_lines(
          ["*set_trace_called*", "* 1 passed in *"]
      )
  
      # Ensure that it also works with --trace.
      result = pytester.runpytest(
          str(p1),
          "--pdbcls=mypdb:Wrapped.MyPdb",
          "--trace",
          syspathinsert=True,
      )
      assert result.ret == 0
      result.stdout.fnmatch_lines(
          ["*runcall_called*", "* 1 passed in *"]
      )
  
imports: import os
  import sys
  from typing import List
  import _pytest._code
  import pytest
  from _pytest.debugging import _validate_usepdb_cls
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import Pytester
label_desc: Use image node_id 10 for calling a global function with example usage: test_pdbcls_via_local_module(pytester) without return types