code: def update(self, id, name, incident_preference):
          
  
          data = {
              "policy": {
                  "name": name,
                  "incident_preference": incident_preference
              }
          }
  
          return self._put(
              url='{0}alerts_policies/{1}.json'.format(self.URL, id),
              headers=self.headers,
              data=data
          )
docs: This API endpoint allows you to update an alert policy
  
          :type id: integer
          :param id: The id of the policy
  
          :type name: str
          :param name: The name of the policy
  
          :type incident_preference: str
          :param incident_preference: Can be PER_POLICY, PER_CONDITION or
              PER_CONDITION_AND_TARGET
  
          :rtype: dict
          :return: The JSON response of the API
  
          ::
  
              {
                  "policy": {
                      "created_at": "time",
                      "id": "integer",
                      "incident_preference": "string",
                      "name": "string",
                      "updated_at": "time"
                  }
              }