def hash_index(v, group):
    """
    Hash values to store hierarchical index

    :param v: index value
    :param group: variables from which index was derived
    :return: str

    v = [1, 2]
    group = ['q1', 'q2]

    return 'q1::1__q2::2'
    """
    if not isinstance(v, (list, tuple)):
        _hash = list(zip(group, [v]))
    else:
        _hash = list(zip(group, v))
    return '__'.join(list(map(lambda x: '%s::%s' % (x[0], x[1]), _hash)))