def _key_to_attribute(key):
    """
    Processes key for attribute accession by replacing illegal chars with a single '_'

    :param str key: Dictionary key to process
    :return: Processed key
    :rtype: str
    """
    illegal_chars = ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '-', '.', ',', '+', '/', '\\', ':', ';']
    for c in illegal_chars:
        key = key.replace(c, '_')
    return '_'.join(x for x in key.split('_') if x)