<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute(self, inputs, outputs):
 """ Get the next record from the queue and encode it. The fields for inputs and outputs are as defined in the spec above. """

    if len(self.queue) > 0:
      # Take the top element of the data queue
      data = self.queue.pop()

    else:
      raise Exception("RawSensor: No data to encode: queue is empty ")

    # Copy data into output vectors
    outputs["resetOut"][0] = data["reset"]
    outputs["sequenceIdOut"][0] = data["sequenceId"]
    outputs["dataOut"][:] = 0
    outputs["dataOut"][data["nonZeros"]] = 1

    if self.verbosity > 1:
      print "RawSensor outputs:"
      print "sequenceIdOut: ", outputs["sequenceIdOut"]
      print "resetOut: ", outputs["resetOut"]
      print "dataOut: ", outputs["dataOut"].nonzero()[0]