code: def createMultipleL4L2Columns(network, networkConfig):
    
  
    # Create each column
    numCorticalColumns = networkConfig["numCorticalColumns"]
    for i in xrange(numCorticalColumns):
      networkConfigCopy = copy.deepcopy(networkConfig)
      layerConfig = networkConfigCopy["L2Params"]
      layerConfig["seed"] = layerConfig.get("seed", 42) + i
  
      layerConfig["numOtherCorticalColumns"] = numCorticalColumns - 1
  
      suffix = "_" + str(i)
      network = createL4L2Column(network, networkConfigCopy, suffix)
  
    # Now connect the L2 columns laterally
    for i in range(networkConfig["numCorticalColumns"]):
      suffixSrc = "_" + str(i)
      for j in range(networkConfig["numCorticalColumns"]):
        if i != j:
          suffixDest = "_" + str(j)
          network.link(
            "L2Column" + suffixSrc, "L2Column" + suffixDest,
            "UniformLink", "",
            srcOutput="feedForwardOutput", destInput="lateralInput",
            propagationDelay=1)
  
    enableProfiling(network)
  
    return network
docs: Create a network consisting of multiple columns.  Each column contains one L4
    and one L2, is identical in structure to the network created by
    createL4L2Column. In addition all the L2 columns are fully connected to each
    other through their lateral inputs.
  
    Region names have a column number appended as in externalInput_0,
    externalInput_1, etc.
  
    networkConfig must be of the following format (see createL4L2Column for
    further documentation):
  
      {
        "networkType": "MultipleL4L2Columns",
        "numCorticalColumns": 3,
        "externalInputSize": 1024,
        "sensorInputSize": 1024,
        "L4Params": {
          <constructor parameters for ApicalTMPairRegion
        },
        "L2Params": {
          <constructor parameters for ColumnPoolerRegion>
        },
        "lateralSPParams": {
          <constructor parameters for optional SPRegion>
        },
        "feedForwardSPParams": {
          <constructor parameters for optional SPRegion>
        }
      }