

def __getitem__(self, name):
    self._AssertValidKey(name)
    if self._measurements[name].dimensions:
        if (name not in self._values):
            self._values[name] = self._measurements[name].MakeUnsetValue()
        return self._values[name]
    if (name not in self._values):
        raise MeasurementNotSetError('Measurement not yet set', name)
    return self._values[name].value

dataset/ETHPy150Open google/openhtf/openhtf/util/measurements.py Collection.__getitem__/original