code: def testLinkingDownwardDimensions(self):
      #
      # Linking can induce dimensions downward
      #
      net = Network()
      level1 = net.addRegion("level1", "TestNode", "")
      level2 = net.addRegion("level2", "TestNode", "")
      dims = Dimensions([3, 2])
      level2.setDimensions(dims)
      net.link("level1", "level2", "TestFanIn2", "")
      net.initialize()
  
      # Level1 should now have dimensions [6, 4]
      self.assertEquals(level1.getDimensions()[0], 6)
      self.assertEquals(level1.getDimensions()[1], 4)
  
      #
      # We get nice error messages when network can't be initialized
      #
      LOGGER.info("=====")
      LOGGER.info(
          "Creating a 3 level network in which levels 1 and 2 have"
      )
      LOGGER.info(
          "dimensions but network initialization will fail because"
      )
      LOGGER.info("level3 does not have dimensions")
      LOGGER.info("Error message follows:")
  
      net = Network()
      level1 = net.addRegion("level1", "TestNode", "")
      level2 = net.addRegion("level2", "TestNode", "")
      _level3 = net.addRegion("level3", "TestNode", "")
      dims = Dimensions([6, 4])
      level1.setDimensions(dims)
      net.link("level1", "level2", "TestFanIn2", "")
      self.assertRaises(RuntimeError, net.initialize)
      LOGGER.info("=====")
  
      LOGGER.info("======")
      LOGGER.info(
          "Creating a link with incompatible dimensions. \
        Error message follows"
      )
      net.link("level2", "level3", "TestFanIn2", "")
      self.assertRaises(RuntimeError, net.initialize)
  
imports: import logging
  import unittest2
  from nupic.engine import Network, Dimensions
label_desc: Use image node_id 2 for calling the NetworkTwoNodeTest obj's underlying member method code with example usage: obj.testLinkingDownwardDimensions() without return types