code: def set_alarm_range_sets(self, parameter, sets):
          
          req = mdb_pb2.ChangeParameterRequest()
          req.action = mdb_pb2.ChangeParameterRequest.SET_ALARMS
          for rs in sets:
              if rs.context :
                  context_alarm = req.contextAlarm.add()
                  context_alarm.context = rs.context
                  alarm_info = context_alarm.alarm
              else :                
                  alarm_info = req.defaultAlarm
                  
              _add_alarms(alarm_info, rs.watch, rs.warning, rs.distress, rs.critical, rs.severe, rs.min_violations)
              
          url = '/mdb/{}/{}/parameters/{}'.format(
              self._instance, self._processor, parameter)
          response = self._client.post_proto(url, data=req.SerializeToString())
          pti = mdb_pb2.ParameterTypeInfo()
          pti.ParseFromString(response.content)
          print(pti)
docs: Apply an ordered list of alarm range sets for the specified parameter.
          This replaces existing alarm sets (if any).
  
          Each RangeSet may have a context, which indicates when
          its effects may be applied. Only the first matching set is
          applied.
  
          A RangeSet with context ``None`` represents the *default* set of
          alarm ranges.  There can be only one such set, and it is always
          applied at the end when no other set of contextual ranges is
          applicable.
  
          :param str parameter: Either a fully-qualified XTCE name or an alias
                                in the format ``NAMESPACE/NAME``.
          :param .RangeSet[] sets: List of range sets (either contextual or not)