code: def compute_output(t0, t1):
      '''Compute the network's output based on the "time to first spike" of the two output neurons.'''
      if t0 is None or t1 is None:
          # If neither of the output neurons fired within the allotted time,
          # give a response which produces a large error.
          return -1.0
      else:
          # If the output neurons fire within 1.0 milliseconds of each other,
          # the output is 1, and if they fire more than 11 milliseconds apart,
          # the output is 0, with linear interpolation between 1 and 11 milliseconds.
          response = 1.1 - 0.1 * abs(t0 - t1)
          return max(0.0, min(1.0, response)f compute_output(t0, t1):
      '''Compute the network's output based on the "time to first spike" of the two output neurons.'''
      if t0 is None or t1 is None:
          # If neither of the output neurons fired within the allotted time,
          # give a response which produces a large error.
          return -1.0
      else:
          # If the output neurons fire within 1.0 milliseconds of each other,
          # the output is 1, and if they fire more than 11 milliseconds apart,
          # the output is 0, with linear interpolation between 1 and 11 milliseconds.
          response = 1.1 - 0.1 * abs(t0 - t1)
          return max(0.0, min(1.0, response))
docs: Compute the network's output based on the "time to first spike" of the two output neurons.