def decompose_list(input_):
    """Recusively decompose any list structure into a flat list"""
    def dec(input_, output_):
        if type(input_) is list:
            for subitem in input_:
                dec(subitem, output_)
        else:
            output_.append(input_)
    output_ = []
    dec(input_, output_)
    return output_