import json


def code_config(code_name: str) -> dict:
    """
    Open and load the configuration file for this code.

    Args:
        code_name (str): The two-letter abbreviation for the code, e.g. fa = Family Law
    Returns:
        (dict): Configuration file.
    """
    with open(f'codes/{code_name.lower()}.json', 'r') as config_file:
        config = json.load(config_file)
    return config