def reference_registry():
    """Load reference registry contents from JSON file"""
    if not REFERENCE_FILE.exists():
        pytest.fail(f"Reference file {REFERENCE_FILE} not found.")

    with REFERENCE_FILE.open("r") as f:
        return json.load(f)
Load reference registry contents from JSON file
spacy/tests/test_registry_population.py