def e_value_normalizer(e_value_raw, k, n_celltypes):
    """
    Normalizes the e-value due to disparity in number of celltypes

    :param e_value_raw: value to normalize
    :param int k: number of rows, in practice it's the number of regulatory elements that give the VEnCode.
    :param int n_celltypes: Number of celltypes in the data (columns)
    :return: normalized e-value
    """
    coefs = {'a': -164054.1, 'b': 0.9998811, 'c': 6.088948e-06, 'd': 
        1.00051, 'm': 0.9527, 'e': -0.1131}
    e_value_expected = (coefs['m'] * k + coefs['e']) * n_celltypes ** (coefs
        ['d'] + (coefs['a'] - coefs['d']) / (1 + (k / coefs['c']) ** coefs[
        'b']))
    e_value_norm = e_value_raw / e_value_expected * 100
    if e_value_norm < 100:
        return e_value_norm
    else:
        return 100
