import hashlib
import json


def make_hash(d: dict):
    """
    Generate a hash for the input dictionary.
    From: https://stackoverflow.com/a/22003440
    Parameters
    ----------
    d: input dictionary

    Returns
    -------
    hash (hex encoded) of the input dictionary.
    """
    return hashlib.md5(json.dumps(d, sort_keys=True).encode("utf-8")).hexdigest()