from typing import Dict
from pathlib import Path
import json


def load_json(filename: str) -> Dict:
    """Read JSON file from metadata folder

    Args:
        filename: Name of metadata file
    Returns:
        dict: Dictionary of data
    """
    filepath = (
        Path(__file__).resolve().parent.parent.joinpath("metadata").joinpath(filename)
    )

    metadata: Dict = json.loads(filepath.read_text())

    return metadata