import hashlib


def create_config_hash(config):
    """Create a hash based on configuration values

    Creating a unique hash based on the values of the configuration
    helps us define a scope around the data. Hence

    Parameters
    ----------
    config : configparser.ConfigParser
        Configuration for the pipeline

    Returns
    -------
    value_hash : str
        Hash representing the current pipeline configuration
    """
    value_str = ""
    for section in config.sections:
        for key in section.keys():
            value_str += str(config[section][key])
    value_hash = hashlib.md5(value_str.encode('utf-8')).hexdigest()

    return value_hash