<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def download_dataset(self, dataset_name, local_path, how="stream"):
 """ It downloads from the repository the specified dataset and puts it in the specified local folder :param dataset_name: the name the dataset has in the repository :param local_path: where you want to save the dataset :param how: 'zip' downloads the whole dataset as a zip file and decompress it; 'stream' downloads the dataset sample by sample :return: None """

        if not os.path.isdir(local_path):
            os.makedirs(local_path)
        else:
            raise ValueError("Path {} already exists!".format(local_path))

        local_path = os.path.join(local_path, FILES_FOLDER)
        os.makedirs(local_path)

        if how == 'zip':
            return self.download_as_zip(dataset_name, local_path)
        elif how == 'stream':
            return self.download_as_stream(dataset_name, local_path)
        else:
            raise ValueError("how must be {'zip', 'stream'}")