code: def test_connection_pattern(self, cls_ofg):
      # Basic case
      x, y, z = T.matrices("xyz")
      out1 = x * y
      out2 = y * z
  
      op1 = cls_ofg([x, y, z], [out1, out2])
      results = op1.connection_pattern(None)
      expect_result = [[True, False], [True, True], [False, True]]
      assert results == expect_result
  
      # Graph with ops that don't have a 'full' connection pattern
      # and with ops that have multiple outputs
      m, n, p, q = T.matrices("mnpq")
      o1, o2 = op1(m, n, p)
      out1, out2 = op1(o1, q, o2)
      op2 = cls_ofg([m, n, p, q], [out1, out2])
  
      results = op2.connection_pattern(None)
      expect_result = [
          [True, False],
          [True, True],
          [False, True],
          [True, True],
      ]
      assert results == expect_result
  
      # Inner graph where some computation doesn't rely on explicit inputs
      srng = RandomStreams(seed=234)
      rv_u = srng.uniform((2, 2))
      x, y = T.matrices("xy")
      out1 = x + rv_u
      out2 = y + 3
      out3 = 3 + rv_u
      op3 = cls_ofg([x, y], [out1, out2, out3])
  
      results = op3.connection_pattern(None)
      expect_result = [
          [True, False, False],
          [False, True, False],
          [True, False, True],
      ]
      assert results == expect_result
  
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 13 for calling the T_OpFromGraph obj's underlying member method code with example usage: obj.test_connection_pattern(cls_ofg) without return types