human
I wrote the below code

    if (not isinstance(itypes, (list, tuple))):
        itypes = [itypes]
    if any(((not isinstance(t, theano.Type)) for t in itypes)):
        raise TypeError('itypes    has    to    be    a    list    of    Theano    types')
    if (not isinstance(otypes, (list, tuple))):
        otypes = [otypes]
    if any(((not isinstance(t, theano.Type)) for t in otypes)):
        raise TypeError('otypes    has    to    be    a    list    of    Theano    types')
    itypes = list(itypes)
    otypes = list(otypes)
    if ((infer_shape is not None) and (not callable(infer_shape))):
        raise TypeError('infer_shape    needs    to    be    a    callable')
    def make_op(fn):
        return FromFunctionOp(fn, itypes, otypes, infer_shape)
    return make_op

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

def as_op(itypes, otypes, infer_shape=None):