import pickle
import hashlib


def generate_hash(data_in):
    """
    Generate a hash from the data_in that can be used to uniquely identify
    equivalent data_in.

    Args:
        data_in (any):
            The data from which a hash is to be generated. This can be of any
            type that can be pickled.
    Returns:
        hash (str):
            A hexidecimal hash representing the data.
    """
    hashable_type = pickle.dumps(data_in)
    hash_result = hashlib.md5(hashable_type).hexdigest()
    return hash_result