from pathlib import Path
import json


def get_reference_data(fname):
    """
    Load JSON reference data.

    :param fname: Filename without extension.
    :type fname: str
    """
    base_dir = Path(__file__).resolve().parent
    fpath = base_dir.joinpath('reference', 'data', fname + '.json')
    with fpath.open() as f:
        return json.load(f)