<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detector(detector_type):
 """ Returns a detector of the specified type. """

        if detector_type == 'point_cloud_box':
            return PointCloudBoxDetector()
        elif detector_type == 'rgbd_foreground_mask_query':
            return RgbdForegroundMaskQueryImageDetector()
        elif detector_type == 'rgbd_foreground_mask':
            return RgbdForegroundMaskDetector()
        raise ValueError('Detector type %s not understood' %(detector_type))