code: def compute(cls, observation, prediction):
          
          assert isinstance(observation, dict)
          try:
              p_value = prediction['mean']  # Use the prediction's mean.
          except (TypeError, KeyError, IndexError):  # If there isn't one...
              try:
                  p_value = prediction['value']  # Use the prediction's value.
              except (TypeError, IndexError):  # If there isn't one...
                  p_value = prediction  # Use the prediction (assume numeric).
          o_mean = observation['mean']
          o_std = observation['std']
          value = (p_value - o_mean)/o_std
          value = utils.assert_dimensionless(value)
          if np.isnan(value):
              score = InsufficientDataScore('One of the input values was NaN')
          else:
              score = ZScore(value)
          return score
docs: Compute a z-score from an observation and a prediction.