human
I wrote the below code

    from theano.tensor import as_tensor_variable
    using_list = isinstance(f, list)
    using_tuple = isinstance(f, tuple)
    if (not isinstance(wrt, (list, tuple))):
        wrt = [wrt]
    if (not isinstance(eval_points, (list, tuple))):
        eval_points = [eval_points]
    if (not isinstance(f, (list, tuple))):
        f = [f]
    assert (len(wrt) == len(eval_points))
    for pack in enumerate(zip(wrt, eval_points)):
        i = pack[0]
        (wrt_elem, eval_point) = pack[1]
        if (not isinstance(wrt_elem, gof.Variable)):
            wrt_elem = as_tensor_variable(wrt_elem)
        if (not isinstance(eval_point, gof.Variable)):
            eval_point = as_tensor_variable(eval_point)
        try:
            if (wrt_elem.type.ndim != eval_point.type.ndim):
                raise ValueError((((((('Element    ' + str(i)) + '    of    wrt/eval_point    have    mismatched    ') + 'dimensionality:    ') + str(wrt_elem.type.ndim)) + '    versus    ') + str(eval_point.type.ndim)))
        except AttributeError:
            pass
    seen_nodes = OrderedDict()
    def _traverse(node):
        '    TODO:    writeme    '
        if (node is None):
            return
        op = node.op
        inputs = node.inputs
        local_eval_points = []
        for inp in inputs:
            if (inp in wrt):
                local_eval_points.append(eval_points[wrt.index(inp)])
            elif (inp.owner is None):
                try:
                    local_eval_points.append(inp.zeros_like())
                except Exception:
                    local_eval_points.append(None)
            elif (inp.owner in seen_nodes):
                local_eval_points.append(seen_nodes[inp.owner][inp.owner.outputs.index(inp)])
            else:
                _traverse(inp.owner)
                local_eval_points.append(seen_nodes[inp.owner][inp.owner.outputs.index(inp)])
        same_type_eval_points = []
        for (x, y) in zip(inputs, local_eval_points):
            if (y is not None):
                if (not...

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

def Rop(f, wrt, eval_points, disconnected_outputs='raise', return_disconnected='zero'):