def METHOD_NAME(pyfile, long_tmpdir, target, run):
    @pyfile
    def code_to_debug():
        import os
        import debuggee
        from debuggee import backchannel
        debuggee.setup()
        backchannel.send(os.path.abspath(__file__))
        print("done")  # @bp
    dir_local = long_tmpdir.mkdir("local")
    dir_remote = long_tmpdir.mkdir("remote")
    path_local = dir_local / "code_to_debug.py"
    path_remote = dir_remote / "code_to_debug.py"
    code_to_debug.copy(path_local)
    code_to_debug.copy(path_remote)
    with debug.Session() as session:
        session.config["pathMappings"] = [{"localRoot": dir_local, "remoteRoot": "."}]
        backchannel = session.open_backchannel()
        with run(session, target(path_remote), cwd=dir_remote):
            # Set breakpoints using local path. This tests that local paths are
            # mapped to remote paths.
            session.set_breakpoints(path_local, all)
        actual_path_remote = backchannel.receive()
        assert some.path(actual_path_remote) == path_remote
        session.wait_for_stop(
            "breakpoint",
            expected_frames=[some.dap.frame(some.dap.source(path_local), line="bp")],
        )
        session.request_continue()