def METHOD_NAME(sets, fn):
    """Repack list from [[a, b, c], [a', b', c'], ....]
    to [fn(a, a', ...), fn(b, b', ...), fn(c, c', ...)]
    where fn can be `tuple` or `list`
    Assume that all elements of input have the same length
    """
    output_list = []
    arg_list_len = len(sets[0])
    for i in range(arg_list_len):
        output_list.append(fn(input_set[i] for input_set in sets))
    return output_list