<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detect_volumes(self, vstype=None, method=None, force=False):
 """Iterator for detecting volumes within this volume system. :param str vstype: The volume system type to use. If None, uses :attr:`vstype` :param str method: The detection method to use. If None, uses :attr:`detection` :param bool force: Specify if you wnat to force running the detection if has_Detected is True. """

        if self.has_detected and not force:
            logger.warning("Detection already ran.")
            return

        if vstype is None:
            vstype = self.vstype
        if method is None:
            method = self.volume_detector

        if method == 'auto':
            method = VolumeSystem._determine_auto_detection_method()

        if method in ALL_VOLUME_SYSTEM_DETECTORS:
            for v in ALL_VOLUME_SYSTEM_DETECTORS[method].detect(self, vstype):
                yield v
        else:
            logger.error("No viable detection method found")
            raise ArgumentError("No viable detection method found")

        self.has_detected = True