human
I wrote the below code

    if (not isinstance(symbol, Symbol)):
        raise TypeError('symbol    must    be    Symbol')
    show_shape = False
    if (shape is not None):
        show_shape = True
        interals = symbol.get_internals()
        (_, out_shapes, _) = interals.infer_shape(**shape)
        if (out_shapes is None):
            raise ValueError('Input    shape    is    incomplete')
        shape_dict = dict(zip(interals.list_outputs(), out_shapes))
    conf = json.loads(symbol.tojson())
    nodes = conf['nodes']
    heads = set(conf['heads'][0])
    if (positions[(-1)] <= 1):
        positions = [int((line_length * p)) for p in positions]
    to_display = ['Layer    (type)', 'Output    Shape', 'Param    #', 'Previous    Layer']
    def print_row(fields, positions):
        'Print    format    row.\n\n                                Parameters\n                                ----------\n                                fields:    list\n                                                Information    field.\n                                positions:    list\n                                                Field    length    ratio.\n                                Returns\n                                ------\n                                None\n                                '
        line = ''
        for (i, field) in enumerate(fields):
            line += str(field)
            line = line[:positions[i]]
            line += ('    ' * (positions[i] - len(line)))
        print line
    print ('_' * line_length)
    print_row(to_display, positions)
    print ('=' * line_length)
    def print_layer_summary(node, out_shape):
        'print    layer    information\n\n                                Parameters\n                                ----------\n                                node:    dict\n                                                Node    information.\n                                out_shape:    dict\n                                                Node    shape    information.\n                     ...

What's a good function header?

Write me a Python program to print    format    row?
assistant
#Here is Python program to print    format    row.

def print_summary(symbol, shape=None, line_length=120, positions=[0.44, 0.64, 0.74, 1.0]):