def METHOD_NAME(imports_rule_runner: PythonRuleRunner):
    filedir = "project"
    filename = "t.py"
    imports_rule_runner.write_files(
        {
            str(Path(filedir, filename)): dedent(
                f"""\
                import json  # unownable, root level
                import os.path  # unownable, not root level
                import stuff  # dependency missing
                import watchdog  # dependency included in other resolve
                import yaml  # dependency included
                try:
                    import weakimport  # weakimport missing
                except ImportError:
                    ...
                open("missing.json")
                # missing asset
                open("{filedir}/config.json")
                # asset
                """
            ),
            str(Path(filedir, "BUILD")): dedent(
                f"""\
                python_source(
                    name="t",
                    source="t.py",
                    dependencies=["//{filedir}:config"],
                    resolve="python-default",
                )
                file(
                    name="config",
                    source="config.json",
                )
                python_requirement(
                    name="imported",
                    requirements=["pyyaml"],
                )
                python_requirement(
                    name="other",
                    requirements=["watchdog"],
                    resolve="other",
                )
                """
            ),
            str(Path(filedir, "config.json")): "",
        }
    )
    tgt = imports_rule_runner.get_target(Address(filedir, target_name="t"))
    result = imports_rule_runner.request(
        PythonSourceAnalysis, (PythonImportDependenciesInferenceFieldSet.create(tgt),)
    )
    assert result
    assert len(result.identified.imports) == 6
    assert (
        len([i for i in result.identified.imports.values() if i.weak]) == 1
    ), "did not find the weak import"
    assert len(result.identified.assets) == 1
    assert (
        result.resolved.assets[str(Path(filedir, "config.json"))].status
        == ImportOwnerStatus.unambiguous
    )
    # possible owners
    assert result.resolved.resolve_results["watchdog"].status == ImportOwnerStatus.unowned
    assert result.possible_owners.value["watchdog"]