code: def test_borrow_input(self):
      # Tests that the contract for io.In is respected. When borrow=False, it should be
      # impossible for outputs to be aliased to the input variables provided by the user,
      # either through a view-map or a destroy map. New tests should be added in the future
      # when borrow=True is implemented.
  
      a = T.dmatrix()
      aval = np.random.rand(3, 3)
  
      # when borrow=False, test that a destroy map cannot alias output to input
      f = theano.function(
          [In(a, borrow=False)], Out(a + 1, borrow=True)
      )
      assert np.all(f(aval) == aval + 1)
      assert not np.may_share_memory(aval, f(aval))
  
      # when borrow=False, test that a viewmap cannot alias output to input
      f = theano.function(
          [In(a, borrow=False)], Out(a[0, :], borrow=True)
      )
      assert np.all(f(aval) == aval[0, :])
      assert not np.may_share_memory(aval, f(aval))
  
imports: from __future__ import absolute_import, print_function, division
  import copy
  import six.moves.cPickle
  import numpy
  import unittest
  import time
  from theano import config, gof
  from six import iteritems
  from theano.compile.io import In, Out
  from theano.compile import function
  from theano.compile import UnusedInputError
  from theano.gof import MissingInputError
  from theano.compat import exc_message
  from theano.tests.unittest_tools import SkipTest
  from theano import tensor
  from theano import tensor
  import theano
label_desc: Use image node_id 25 for calling the T_function obj's underlying member method code with example usage: obj.test_borrow_input() without return types