def _createL2456Column(network, networkConfig, suffix=""):
  """
  Create a single L2456 column with appropriate suffix on the name.
  """

  locationInputName = "locationInput" + suffix
  sensorInputName = "sensorInput" + suffix
  coarseSensorInputName = "coarseSensorInput" + suffix
  L2ColumnName = "L2Column" + suffix
  L4ColumnName = "L4Column" + suffix
  L5ColumnName = "L5Column" + suffix
  L6ColumnName = "L6Column" + suffix

  # TODO: Convert locationInput to a coordinate sensor region once its ready
  # Add the three sensors to network.
  network.addRegion(
    locationInputName, "py.CoordinateSensorRegion",
    json.dumps(networkConfig["locationParams"]))
  network.addRegion(
    coarseSensorInputName, "py.RawSensor",
    json.dumps(networkConfig["coarseSensorParams"]))
  network.addRegion(
    sensorInputName, "py.RawSensor",
    json.dumps(networkConfig["sensorParams"]))

  # Add L2/L5 column pooler regions
  network.addRegion(
    L2ColumnName, "py.ColumnPoolerRegion",
    json.dumps(networkConfig["L2Params"]))
  network.addRegion(
    L5ColumnName, "py.ColumnPoolerRegion",
    json.dumps(networkConfig["L5Params"]))

  # Add L4/L6 extended temporal memory regions
  L6Params = copy.deepcopy(networkConfig["L6Params"])
  L6Params["basalInputWidth"] = networkConfig["locationParams"]["outputWidth"]
  L6Params["apicalInputWidth"] = networkConfig["L5Params"]["cellCount"]
  network.addRegion(
    L6ColumnName, "py.ApicalTMPairRegion",
    json.dumps(L6Params))

  L4Params = copy.deepcopy(networkConfig["L4Params"])
  L4Params["basalInputWidth"] = (
    L6Params["columnCount"] * L6Params["cellsPerColumn"] )
  L4Params["apicalInputWidth"] = networkConfig["L2Params"]["cellCount"]
  network.addRegion(
    L4ColumnName, "py.ApicalTMPairRegion",
    json.dumps(L4Params))

  # Once regions are created, ensure inputs match column counts
  assert(network.regions[L6ColumnName].getParameter("columnCount") ==
         network.regions[coarseSensorInputName].getParameter("outputWidth")), \
         "L6 column count must equal coarse sensor width"

  assert(network.regions[L4ColumnName].getParameter("columnCount") ==
         network.regions[sensorInputName].getParameter("outputWidth")), \
         "L4 column count must equal sensor width"

  # Link up the sensors
  network.link(locationInputName, L6ColumnName, "UniformLink", "",
               srcOutput="dataOut", destInput="basalInput")
  network.link(coarseSensorInputName, L6ColumnName, "UniformLink", "",
               srcOutput="dataOut", destInput="activeColumns")
  network.link(sensorInputName, L4ColumnName, "UniformLink", "",
               srcOutput="dataOut", destInput="activeColumns")

  # Link L6 to L4
  network.link(L6ColumnName, L4ColumnName, "UniformLink", "",
               srcOutput="activeCells", destInput="basalInput")

  # Link L4 to L2, L6 to L5
  network.link(L4ColumnName, L2ColumnName, "UniformLink", "",
               srcOutput="activeCells", destInput="feedforwardInput")
  network.link(L4ColumnName, L2ColumnName, "UniformLink", "",
               srcOutput="predictedActiveCells",
               destInput="feedforwardGrowthCandidates")
  network.link(L6ColumnName, L5ColumnName, "UniformLink", "",
               srcOutput="activeCells", destInput="feedforwardInput")
  network.link(L6ColumnName, L5ColumnName, "UniformLink", "",
               srcOutput="predictedActiveCells",
               destInput="feedforwardGrowthCandidates")

  # Link L2 feedback to L4, L5 to L6
  network.link(L2ColumnName, L4ColumnName, "UniformLink", "",
               srcOutput="feedForwardOutput", destInput="apicalInput",
               propagationDelay=1)
  network.link(L5ColumnName, L6ColumnName, "UniformLink", "",
               srcOutput="feedForwardOutput", destInput="apicalInput",
               propagationDelay=1)

  # Link reset outputs to L5 and L2. For L6 and L4, an empty input is sufficient
  # for a reset.
  network.link(sensorInputName, L5ColumnName, "UniformLink", "",
               srcOutput="resetOut", destInput="resetIn")
  network.link(sensorInputName, L2ColumnName, "UniformLink", "",
               srcOutput="resetOut", destInput="resetIn")


  # Set phases appropriately so regions are executed in the proper sequence.
  # This is required particularly when we create multiple columns - the order of
  # execution is not the same as the order of region creation.
  # All sensors have phase 0
  # All L6's have phase 2
  # All L5's have phase 3
  # All L4's have phase 4
  # All L2's have phase 5
  # Note: we skip phase 1 in case we add spatial poolers on top of the sensors.

  network.setPhases(locationInputName,[0])
  network.setPhases(sensorInputName,[0])
  network.setPhases(coarseSensorInputName,[0])
  network.setPhases(L6ColumnName,[2])
  network.setPhases(L5ColumnName,[3])
  network.setPhases(L4ColumnName, [4])
  network.setPhases(L2ColumnName, [5])

  return network
Create a single L2456 column with appropriate suffix on the name.