code: def test_connection_pattern_override(self, cls_ofg):
      x, y = T.vectors("xy")
  
      def f1(x, y):
          del x
          # but we know how to backpropagate for x for some reasons
          # and we don't care about the gradient wrt y.
          return y + T.round(y)
  
      def f1_back(inputs, output_gradients):
          return [
              output_gradients[0],
              theano.gradient.disconnected_type(),
          ]
  
      op = cls_ofg(
          inputs=[x, y],
          outputs=[f1(x, y)],
          grad_overrides=f1_back,
          connection_pattern=[[True], [False]],  # This is new
          on_unused_input="ignore",
      )  # This is new
  
      c = op(x, y)
  
      g1 = theano.grad(c.sum(), x)
  
      out = g1.eval(
          {
              x: np.ones((5,), dtype=np.float32),
              y: np.ones((5,), dtype=np.float32),
          }
      )
      assert np.allclose(out, [1.0] * 5)
  
imports: from __future__ import absolute_import, print_function, division
  from functools import partial
  import numpy
  import theano
  from theano import config, shared
  from theano.gradient import DisconnectedType
  from theano.gof.null_type import NullType
  from theano.compile import function
  from theano import tensor
  from theano.tensor.shared_randomstreams import RandomStreams
  from theano.compile.builders import OpFromGraph
  from theano.tests import unittest_tools
label_desc: Use image node_id 11 for calling the T_OpFromGraph obj's underlying member method code with example usage: obj.test_connection_pattern_override(cls_ofg) and returns: unknown, list