code: def createEncoder():
      """Create the encoder instance for our test and return it."""
      consumption_encoder = ScalarEncoder(
          21, 0.0, 100.0, n=50, name="consumption", clipInput=True
      )
      time_encoder = DateEncoder(
          timeOfDay=(21, 9.5), name="timestamp_timeOfDay"
      )
  
      encoder = MultiEncoder()
      encoder.addEncoder("consumption", consumption_encoder)
      encoder.addEncoder("timestamp", time_encoder)
  
      return encoder
  
file_path: nupic-legacy/tests/integration/nupic/engine/network_creation_common.py
imports: import copy
  import csv
  import json
  import os
  import tempfile
  from pkg_resources import resource_filename
  from nupic.data.file_record_stream import FileRecordStream
  from nupic.engine import Network
  from nupic.encoders import MultiEncoder, ScalarEncoder, DateEncoder
  from nupic.regions.record_sensor import RecordSensor
  from nupic.regions.sp_region import SPRegion
  from nupic.regions.tm_region import TMRegion
label_desc: Use image node_id 1 for calling a global function with example usage: createEncoder() and returns: encoder