code: def _createNetwork():
      """Create network with one RecordSensor region."""
      network = Network()
      network.addRegion("sensor", "py.RecordSensor", "{}")
      sensorRegion = network.regions["sensor"].getSelf()
  
      # Add an encoder.
      encoderParams = {
          "consumption": {
              "fieldname": "consumption",
              "resolution": 0.88,
              "seed": 1,
              "name": "consumption",
              "type": "RandomDistributedScalarEncoder",
          }
      }
  
      encoder = MultiEncoder()
      encoder.addMultipleEncoders(encoderParams)
      sensorRegion.encoder = encoder
  
      # Add a data source.
      testDir = os.path.dirname(os.path.abspath(__file__))
      inputFile = os.path.join(testDir, "fixtures", "gymdata-test.csv")
      dataSource = FileRecordStream(streamID=inputFile)
      sensorRegion.dataSource = dataSource
  
      # Get and set what field index we want to predict.
      network.regions["sensor"].setParameter(
          "predictedField", "consumption"
      )
  
      return network
  
file_path: nupic-legacy/tests/unit/nupic/regions/record_sensor_region_test.py
imports: import numpy
  import os
  import unittest2
  from nupic.engine import Network
  from nupic.encoders import MultiEncoder
  from nupic.data.file_record_stream import FileRecordStream
label_desc: Use image node_id 1 for calling a global function with example usage: _createNetwork() and returns: network