code: def create_detector(self, detector):
          
          resp = self._post(self._u(self._DETECTOR_ENDPOINT_SUFFIX),
                            data=detector)
          resp.raise_for_status()
          return resp.json()
docs: Creates a new detector.
  
          Args:
              detector (object): the detector model object. Will be serialized as
                  JSON.
          Returns:
              dictionary of the response (created detector model).