

def __setitem__(self, name, value):
    self._AssertValidKey(name)
    if self._measurements[name].dimensions:
        raise InvalidDimensionsError('Cannot set dimensioned measurement without indices')
    if (name not in self._values):
        self._values[name] = self._measurements[name].MakeUnsetValue()
    self._values[name].value = value

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