def METHOD_NAME(importer, name, is_package):
    spec = importer.find_spec(fullname=name)
    assert spec.name == name
    assert spec.loader is importer
    # We can't check directly the is_package value, but this is a side-effect:
    assert spec.submodule_search_locations == ([] if is_package else None)