def METHOD_NAME(fail_if_no_data=False):
    """
    A decorator that skips a test if data is not loaded.
    By default, only a severely limited subset of data is available in tests.
    Test environments can inject real gamedata by writing to tests/static/compendium.
    Default exposed gamedata:
    Conditions: FakeCondition
    Names: Elf, Family
    Rules: Fake Rule
    Backgrounds: Acolyte
    Monsters: Mage, Kobold
    Classes: Fighter (Champion)
    Classfeats: None
    Feats: Grappler
    Items: Longsword
    Itemprops: Versatile
    Races: Human
    Spells: Fire Bolt, Fireball
    """
    if not compendium.spells:  # if spells have not loaded, no data has
        compendium.load_all_json(base_path=GAMEDATA_BASE_PATH)
        compendium.load_common()
    if not compendium.spells:  # we have no data, then
        if not fail_if_no_data:
            return pytest.mark.skip(reason="Test requires gamedata")
        else:
            # this returns a decorator, so make our actual method just fail
            return lambda func: lambda *_, **__: pytest.fail("Test requires gamedata")
    return lambda func: func