def __init__(self, data_folder="data/", trainval=True):
        """
        Args:
            data_folder (string): folder in which to download
            inaturalist dataset.
        """
        # Get train data (incl val data) or test data
        self.trainval = trainval
        self.log = logging.getLogger("avalanche")

        if os.path.isabs(data_folder):
            self.data_folder = data_folder
        else:
            self.data_folder = os.path.join(os.path.dirname(__file__), data_folder)

        try:
            # Create target Directory for INATURALIST data
            os.makedirs(self.data_folder, exist_ok=True)
            self.log.info("Directory %s created", self.data_folder)
            self.download = True
            self.download_inaturalist()

        except OSError:
            import traceback

            traceback.print_exc()
            self.download = False
            self.log.error("Directory %s already exists", self.data_folder)

        Args:
            data_folder (string): folder in which to download
            inaturalist dataset.
        
avalanche/benchmarks/datasets/inaturalist/inaturalist_data.py