import gzip
import json


def load_reference_file(path):
    """
    Load a list of merged otus documents from a file associated with a Virtool reference file.

    :param path: the path to the otus.json.gz file
    :type path: str

    :return: the otus data to import
    :rtype: dict

    """
    with open(path, "rb") as handle:
        with gzip.open(handle, "rt") as gzip_file:
            return json.load(gzip_file)