def createNetwork(dataSource):
network = Network()<EOL>network.addRegion("<STR_LIT>", "<STR_LIT>",<EOL>json.dumps({"<STR_LIT>": _VERBOSITY}))<EOL>sensor = network.regions["<STR_LIT>"].getSelf()<EOL>sensor.encoder = createEncoder()<EOL>sensor.dataSource = dataSource<EOL>SP_PARAMS["<STR_LIT>"] = sensor.encoder.getWidth()<EOL>network.addRegion("<STR_LIT>", "<STR_LIT>", json.dumps(SP_PARAMS))<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>")<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>srcOutput="<STR_LIT>", destInput="<STR_LIT>")<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>srcOutput="<STR_LIT>", destInput="<STR_LIT>")<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>srcOutput="<STR_LIT>", destInput="<STR_LIT>")<EOL>network.addRegion("<STR_LIT>", "<STR_LIT>",<EOL>json.dumps(TM_PARAMS))<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>")<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>srcOutput="<STR_LIT>", destInput="<STR_LIT>")<EOL>network.addRegion("<STR_LIT>", "<STR_LIT>",<EOL>json.dumps({}))<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", srcOutput="<STR_LIT>", destInput="<STR_LIT>")<EOL>network.link("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>srcOutput="<STR_LIT>", destInput="<STR_LIT>")<EOL>spatialPoolerRegion = network.regions["<STR_LIT>"]<EOL>spatialPoolerRegion.setParameter("<STR_LIT>", True)<EOL>spatialPoolerRegion.setParameter("<STR_LIT>", False)<EOL>temporalPoolerRegion = network.regions["<STR_LIT>"]<EOL>temporalPoolerRegion.setParameter("<STR_LIT>", True)<EOL>temporalPoolerRegion.setParameter("<STR_LIT>", True)<EOL>temporalPoolerRegion.setParameter("<STR_LIT>", True)<EOL>temporalPoolerRegion.setParameter("<STR_LIT>", True)<EOL>return network<EOL>
Create the Network instance.

    The network has a sensor region reading data from `dataSource` and passing
    the encoded representation to an SPRegion. The SPRegion output is passed to
    a TMRegion.

    :param dataSource: a RecordStream instance to get data from
    :returns: a Network instance ready to run