code: def cli_main():
      cli = LightningCLI(
          LitAutoEncoder,
          MyDataModule,
          seed_everything_default=1234,
          run=False,  # used to de-activate automatic fitting.
          trainer_defaults={
              "callbacks": ImageSampler(),
              "max_epochs": 10,
          },
          save_config_kwargs={"overwrite": True},
      )
      cli.trainer.fit(cli.model, datamodule=cli.datamodule)
      cli.trainer.test(ckpt_path="best", datamodule=cli.datamodule)
      predictions = cli.trainer.predict(
          ckpt_path="best", datamodule=cli.datamodule
      )
      print(predictions[0])
  
imports: from os import path
  from typing import Optional, Tuple
  import torch
  import torch.nn.functional
  from lightning.pytorch import LightningDataModule, LightningModule, Trainer, callbacks, cli_lightning_logo
  from lightning.pytorch.cli import LightningCLI
  from lightning.pytorch.demos.mnist_datamodule import MNIST
  from lightning.pytorch.utilities import rank_zero_only
  from lightning.pytorch.utilities.imports import _TORCHVISION_AVAILABLE
  from torch import nn
  from torch.utils.data import DataLoader, random_split
label_desc: Use image node_id 1 for calling a global function with example usage: cli_main() without return types