def METHOD_NAME() -> PythonRuleRunner:
    METHOD_NAME = PythonRuleRunner(
        rules=[
            *repl_rules(),
            *python_repl.rules(),
            *pex_from_targets.rules(),
            *local_dists.rules(),
            *target_types_rules(),
            QueryRule(Process, (PexProcess,)),
        ],
        target_types=[
            PythonSourcesGeneratorTarget,
            ProtobufSourceTarget,
            PythonSourceTarget,
            PythonRequirementTarget,
        ],
    )
    METHOD_NAME.write_files(
        {
            "src/python/foo.proto": 'syntax = "proto3";message Foo {}',
            "src/python/lib.py": "from foo import Foo\nclass SomeClass:\n  pass\n",
            "src/python/BUILD": dedent(
                """\
                protobuf_source(name='proto', source='foo.proto')
                python_sources(dependencies=[':proto'])
                """
            ),
        }
    )
    return METHOD_NAME