produce a list representation of the partition
504378
def tolist(self):
        
        return [[x.val for x in theclass.items] for theclass in self.classes]
173698
def output_reduce_list(path_list, force=False):
    """"""
    output_paths = []
    for path in path_list:
        output_path = output_reduce(path, force=force)
        if output_path:
            output_paths.append(output_path)
    return output_paths
1028450
def flat_list(input_list):
    

    """
    x = input_list
    if isinstance(x, list):
        return [a for i in x for a in flat_list(i)]
    else:
        return [x]
295246
def split_all(reference, sep):
    
    parts = partition_all(reference, sep)
    return [p for p in parts if p not in sep]
191701
def _make_input_file_list(binnedfile, num_files):
    
    outdir_base = os.path.abspath(os.path.dirname(binnedfile))
    outbasename = os.path.basename(binnedfile)
    filelist = ""
    for i in range(num_files):
        split_key = "%06i" % i
        output_dir = os.path.join(outdir_base, split_key)
        filepath = os.path.join(output_dir,
                                outbasename.replace('.fits', '_%s.fits' % split_key))
        filelist += ' %s' % filepath
    return filelist
341376
def create_chunked_list(in_dir, size, out_dir, out_name):
    
    create_dirs(out_dir)

    in_files = get_files(in_dir)
    chunks = chunk(in_files, size)

    division = {}

    for i, files in enumerate(chunks):
        division[i] = [os.path.basename(f) for f in files]

    out_file = os.path.join(out_dir, out_name)
    with codecs.open(out_file, 'wb', encoding='utf-8') as f:
        json.dump(division, f, indent=4)
986386
def partition(pred, iterable):
    ''
    # partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
    t1, t2 = itertools.tee(iterable)
    return list(filter(negate(pred), t1)), list(filter(pred, t2))
1145046
def repr_list(_list, indent):
    """"""
    # pprint represents lists and tuples in one row if possible. We want one
    # per row, so we iterate ourselves.
    if _list is None:
        return 'None'
    if isinstance(_list, MutableSequence):
        bm = '['
        em = ']'
    elif isinstance(_list, Iterable):
        bm = '('
        em = ')'
    else:
        raise TypeError("Object must be an iterable, but is a %s" %
                        type(_list))
    ret = bm + '\n'
    for value in _list:
        ret += _indent('%r,\n' % value, 2)
    ret += em
    ret = repr_text(ret, indent=indent)
    return ret.lstrip(' ')
1085154
def mapstr_to_list(mapstr):
    
    maplist = []

    with StringIO(mapstr) as infile:
        for row in infile:
            maplist.append(row.strip())

    return maplist
220278
def partition_iter(pred, iterable):
    
    left, right = itertools.tee(iterable, 2)
    return (
        (x for x in left if pred(x)),
        (y for y in right if not pred(y))
    )
635513
def _get_repr_list(self):
        
        spacing = ' '*2
        text = ['']
        text.append("%sfile: %s" % (spacing, self._filename))
        text.append("%sextension: %d" % (spacing, self._info['hdunum']-1))
        text.append(
            "%stype: %s" % (spacing, _hdu_type_map[self._info['hdutype']]))

        extname = self.get_extname()
        if extname != "":
            text.append("%sextname: %s" % (spacing, extname))
        extver = self.get_extver()
        if extver != 0:
            text.append("%sextver: %s" % (spacing, extver))

        return text, spacing
1350453
def _dbg_output(self):
        
        s = "["
        lst = []
        for segment in self._list:
            lst.append(repr(segment))
        s += ", ".join(lst)
        s += "]"
        return s
756362
def partition(string, sep):
    
    p = string.split(sep, 1)
    if len(p) == 2:
        return p[0], sep, p[1]
    return string, '', ''
36072
def toList(self):
        
        slist = angle.toList(self.value)
        # Keep hours in 0..23
        slist[1] = slist[1] % 24
        return slist
261127
def to_list(self):
        """"""
        output = []
        for i in range(1, len(self.elements), 2):
            output.append(self.elements[i])
        return output
985288
def integer_partition(size: int, nparts: int) -> Iterator[List[List[int]]]:
    
    for part in algorithm_u(range(size), nparts):
        yield part
183770
def tolist(self, to):
        
        return ', '.join(isinstance(to, list) and [u(x) for x in to] or [u(to)])