human
I wrote the below code

    if isinstance(prec, int):
        num_fmt = ('%%.%df' % prec)
    elif isinstance(prec, six.string_types):
        num_fmt = prec
    else:
        raise TypeError
    coord_fmt = '    '.join([num_fmt, num_fmt])
    def formatted_coords(coords):
        return ','.join([(coord_fmt % c[:2]) for c in coords])
    def formatted_poly(poly):
        return ','.join([('(%s)' % formatted_coords(r)) for r in poly])
    def formatted_geom(g):
        gtype = str(g.geom_type).upper()
        (yield ('%s(' % gtype))
        if (gtype == 'POINT'):
            (yield formatted_coords((g.coords,)))
        elif (gtype in ('LINESTRING', 'LINEARRING')):
            (yield formatted_coords(g.coords))
        elif (gtype in ('POLYGON', 'MULTILINESTRING')):
            (yield formatted_poly(g))
        elif (gtype == 'MULTIPOINT'):
            (yield formatted_coords(g.coords))
        elif (gtype == 'MULTIPOLYGON'):
            (yield ','.join([('(%s)' % formatted_poly(p)) for p in g]))
        elif (gtype == 'GEOMETRYCOLLECTION'):
            (yield ','.join([''.join([wkt for wkt in formatted_geom(child)]) for child in g]))
        else:
            raise TypeError
        (yield ')')
    return ''.join([wkt for wkt in formatted_geom(geom)])

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def precision_wkt(geom, prec):