import json


def read_json(infile, log=None) -> dict:
    """
    Read JSON file and return a python dictionary

    Args:
        infile: path to the json file; can be hdfs path

    Returns:
        python dictionary
    """
    if infile.startswith("hdfs"):
        # replace pydoop
        # f = hdfs.open(infile)
        # dict_ = json.load(f)
        # f.close()
        raise NotImplementedError
    else:
        return json.load(open(infile, "r"))