

def WithArgs(self, **kwargs):
    'Creates a new Measurement, see openhtf.PhaseInfo.WithArgs.'
    new_meas = mutablerecords.CopyRecord(self)
    if ('{' in new_meas.name):
        formatter = (lambda x: (x.format(**kwargs) if kwargs else x))
    else:
        formatter = (lambda x: ((x % kwargs) if x else x))
    new_meas.name = formatter(self.name)
    new_meas.docstring = formatter(self.docstring)
    return new_meas

dataset/ETHPy150Open google/openhtf/openhtf/util/measurements.py Measurement.WithArgs/VarMisuse@50/82 `x`->`kwargs`