human
Complete the below
def _seq_pprinter_factory(start, end, basetype):

    ''''Factory that returns a pprint function useful for sequences.  Used by
    the default pprint for tuples, dicts, and lists.'
    '''

=====
Give me a Python program to print function useful for sequences?
assistant
#Here is Python program to print function useful for sequences.
    def inner(obj, p, cycle):
        typ = type(obj)
        if ((basetype is not None) and (typ is not basetype) and (typ.__repr__ != basetype.__repr__)):
            return p.text(typ.__repr__(obj))
        if cycle:
            return p.text(((start + '...') + end))
        step = len(start)
        p.begin_group(step, start)
        for (idx, x) in p._enumerate(obj):
            if idx:
                p.text(',')
                p.breakable()
            p.pretty(x)
        if ((len(obj) == 1) and (type(obj) is tuple)):
            p.text(',')
        p.end_group(step, end)
    return inner