import json


def read_bundles(bundle_list_file):
    """Read bundles in to a dict from a file.

    This function expects the JSON file follows a pre-defined schema:
        [
            {"bundle_uuid": XXX, "bundle_version": XXX},
            {"bundle_uuid": XXX, "bundle_version": XXX}
        ]

    Args:
        bundle_list_file (str): A path to the JSON file.

    Returns:
        bundles (dict): A dict of bundles listed in the file.
    """
    with open(bundle_list_file) as f:
        bundles = json.load(f)
    return bundles