def instantiate_trainer(self) -> None:
        """Instantiates the trainer using self.config_init['trainer']"""
        if self.config_init["trainer"].get("callbacks") is None:
            self.config_init["trainer"]["callbacks"] = []
        callbacks = [self.config_init[c] for c in self.parser.callback_keys]
        self.config_init["trainer"]["callbacks"].extend(callbacks)
        if "callbacks" in self.trainer_defaults:
            if isinstance(self.trainer_defaults["callbacks"], list):
                self.config_init["trainer"]["callbacks"].extend(self.trainer_defaults["callbacks"])
            else:
                self.config_init["trainer"]["callbacks"].append(self.trainer_defaults["callbacks"])
        if self.save_config_callback and not self.config_init["trainer"]["fast_dev_run"]:
            config_callback = self.save_config_callback(
                self.parser, self.config, self.save_config_filename, overwrite=self.save_config_overwrite
            )
            self.config_init["trainer"]["callbacks"].append(config_callback)
        self.trainer = self.trainer_class(**self.config_init["trainer"])
Instantiates the trainer using self.config_init['trainer']
src/flash/core/utilities/lightning_cli.py