<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_detector(self, detector_id, detector):
 """Update an existing detector. Args: detector_id (string):
 the ID of the detector. detector (object):
 the detector model object. Will be serialized as JSON. Returns: dictionary of the response (updated detector model). """

        resp = self._put(self._u(self._DETECTOR_ENDPOINT_SUFFIX, detector_id),
                         data=detector)
        resp.raise_for_status()
        return resp.json()