original_docstring: 
      Starts up the SensorPi runtime, begins listening for SenseHat input,
      establishing a connection to a local CommPi via LAN, and sending data
      for transmission to the CommPi
      
docstring: Starts up the SensorPi runtime, begins listening for SenseHat input,
  establishing a connection to a local CommPi via LAN, and sending data
  for transmission to the CommPi
docstring_tokens: Starts up the SensorPi runtime begins listening for SenseHat input establishing a connection to a local CommPi via LAN and sending data for transmission to the CommPi
code: def handleSense():
      """
      Starts up the SensorPi runtime, begins listening for SenseHat input,
      establishing a connection to a local CommPi via LAN, and sending data
      for transmission to the CommPi
      """
      sensor_keys = get_sensor_keys()
      sensor_ids = {}
      sensor_ids[sensor_keys["TEMPERATURE"]] = 2
      sensor_ids[sensor_keys["PRESSURE"]] = 3
      sensor_ids[sensor_keys["HUMIDITY"]] = 4
      sensor_ids[sensor_keys["ACCELERATION"]] = 5
      sensor_ids[sensor_keys["ORIENTATION"]] = 6
      sensePi = SensePi(sensor_ids=sensor_ids)
  
      client = WebClient()
  
      while True:
          print("while true")
          temp = sensePi.get_temperature()
          pres = sensePi.get_pressure()
          hum = sensePi.get_humidity()
          acc = sensePi.get_acceleration()
          orie = sensePi.get_orientation()
          all = sensePi.get_all()
  
          dataArr = [temp, pres, hum, acc, orie, all]
  
          for payload in dataArr:
              payload = json.dumps(payload)
              payload = json.loads(payload)
              print(payload)
              try:
                  client.send(payload)
              except Exception as err:
                  print("error occurred: {}".format(str(err)))
                  raise
              time.sleep(1)
code_tokens: def handleSense ( ) : sensor_keys = get_sensor_keys ( ) sensor_ids = { } sensor_ids [ sensor_keys [ "TEMPERATURE" ] ] = 2 sensor_ids [ sensor_keys [ "PRESSURE" ] ] = 3 sensor_ids [ sensor_keys [ "HUMIDITY" ] ] = 4 sensor_ids [ sensor_keys [ "ACCELERATION" ] ] = 5 sensor_ids [ sensor_keys [ "ORIENTATION" ] ] = 6 sensePi = SensePi ( sensor_ids = sensor_ids ) client = WebClient ( ) while True : print ( "while true" ) temp = sensePi . get_temperature ( ) pres = sensePi . get_pressure ( ) hum = sensePi . get_humidity ( ) acc = sensePi . get_acceleration ( ) orie = sensePi . get_orientation ( ) all = sensePi . get_all ( ) dataArr = [ temp , pres , hum , acc , orie , all ] for payload in dataArr : payload = json . dumps ( payload ) payload = json . loads ( payload ) print ( payload ) try : client . send ( payload ) except Exception as err : print ( "error occurred: {}" . format ( str ( err ) ) ) raise time . sleep ( 1 )
short_docstring: Starts up the SensorPi runtime, begins listening for SenseHat input,
  establishing a connection to a local CommPi via LAN, and sending data
  for transmission to the CommPi
short_docstring_tokens: Starts up the SensorPi runtime begins listening for SenseHat input establishing a connection to a local CommPi via LAN and sending data for transmission to the CommPi
comment: """
      Starts up the SensorPi runtime, begins listening for SenseHat input,
      establishing a connection to a local CommPi via LAN, and sending data
      for transmission to the CommPi
      """