def _AssertValidKey(self, name):
    if name not in self._measurements:
      raise NotAMeasurementError('Not a measurement', name, self._measurements)
Raises if name is not a valid measurement.
dataset/ETHPy150Open google/openhtf/openhtf/util/measurements.py/Collection._AssertValidKey