def convert (self, bg_targets):
    assert ['mg/dL', 'mmol/L'] in bg_targets['units']

    if bg_targets['units'] != self.units:
      for target in bg_targets['targets']:
        target['high'] = self.to_unit(target['high'])
        target['low'] = self.to_unit(target['low'])

    bg_targets['user_preferred_units'] = bg_targets['units']
    bg_targets['units'] = self.units

    return bg_targets
dataset/ETHPy150Open openaps/openaps/openaps/vendors/units.py/bg_targets.convert/swapped operands of `in`