<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_all(self, config_file, region=None, profile_name=None):
 """ Clean all provisioned artifacts from both the local file and the AWS Greengrass service. :param config_file: config file containing the group to clean :param region: the region in which the group should be cleaned. [default: us-west-2] :param profile_name: the name of the `awscli` profile to use. [default: None] """

        logging.info('[begin] Cleaning all provisioned artifacts')
        config = GroupConfigFile(config_file=config_file)
        if config.is_fresh() is True:
            raise ValueError("Config is already clean.")

        if region is None:
            region = self._region

        self._delete_group(
            config_file, region=region, profile_name=profile_name)
        self.clean_core(config_file, region=region)
        self.clean_devices(config_file, region=region)
        self.clean_file(config_file)

        logging.info('[end] Cleaned all provisioned artifacts')