def METHOD_NAME(tmp_path):
    exttree = {"list_of_stuff": ["foobar", 42, np.array([7, 8, 9], float)]}
    external_path = os.path.join(str(tmp_path), "external.asdf")
    ff = asdf.AsdfFile(exttree)
    ff.write_to(external_path)
    tree = {"foo": {"$ref": "external.asdf#/list_of_stuff/a"}}
    with asdf.AsdfFile(tree, uri=util.filepath_to_url(os.path.join(str(tmp_path), "main.asdf"))) as ff, pytest.raises(
        ValueError,
        match=r"Unresolvable reference: .*",
    ):
        ff.resolve_references()
    tree = {"foo": {"$ref": "external.asdf#/list_of_stuff/3"}}
    with asdf.AsdfFile(tree, uri=util.filepath_to_url(os.path.join(str(tmp_path), "main.asdf"))) as ff, pytest.raises(
        ValueError,
        match=r"Unresolvable reference: .*",
    ):
        ff.resolve_references()