def function(inputs, outputs, updates=None, givens=None):
if isinstance(outputs, list):<EOL><INDENT>return _Function(inputs, outputs, updates, givens=givens)<EOL><DEDENT>elif isinstance(outputs, (dict, collections.OrderedDict)):<EOL><INDENT>f = _Function(inputs, outputs.values(), updates, givens=givens)<EOL>return lambda *args, **kwargs: type(outputs)(zip(outputs.keys(), f(*args, **kwargs)))<EOL><DEDENT>else:<EOL><INDENT>f = _Function(inputs, [outputs], updates, givens=givens)<EOL>return lambda *args, **kwargs: f(*args, **kwargs)[<NUM_LIT:0>]<EOL><DEDENT>
Just like Theano function. Take a bunch of tensorflow placeholders and expressions
    computed based on those placeholders and produces f(inputs) -> outputs. Function f takes
    values to be fed to the input's placeholders and produces the values of the expressions
    in outputs.

    Input values can be passed in the same order as inputs or can be provided as kwargs based
    on placeholder name (passed to constructor or accessible via placeholder.op.name).

    Example:
        x = tf.placeholder(tf.int32, (), name="x")
        y = tf.placeholder(tf.int32, (), name="y")
        z = 3 * x + 2 * y
        lin = function([x, y], z, givens={y: 0})

        with single_threaded_session():
            initialize()

            assert lin(2) == 6
            assert lin(x=3) == 9
            assert lin(2, 2) == 10
            assert lin(x=2, y=3) == 12

    Parameters
    ----------
    inputs: [tf.placeholder, tf.constant, or object with make_feed_dict method]
        list of input arguments
    outputs: [tf.Variable] or tf.Variable
        list of outputs or a single output to be returned from function. Returned
        value will also have the same shape.
    updates: [tf.Operation] or tf.Operation
        list of update functions or single update function that will be run whenever
        the function is called. The return is ignored.