code: def lightly_cli(cfg):
      """Train a self-supervised model and use it to embed your dataset.
  
      Args:
          cfg:
              The default configs are loaded from the config file.
              To overwrite them please see the section on the config file
              (.config.config.yaml).
  
      Command-Line Args:
          input_dir:
              Path to the input directory where images are stored.
  
      Examples:
          >>> # train model and embed images with default settings
          >>> lightly-magic input_dir=data/
          >>>
          >>> # train model for 10 epochs and embed images
          >>> lightly-magic input_dir=data/ trainer.max_epochs=10
  
  
      """
      return _lightly_cli(cfg)
  
file_path: lightly/lightly/cli/lightly_cli.py
imports: import hydra
  from omegaconf import DictConfig
  from lightly.cli._helpers import fix_hydra_arguments
  from lightly.cli.embed_cli import _embed_cli
  from lightly.cli.train_cli import _train_cli
  from lightly.utils.hipify import print_as_warning
label_desc: Use image node_id 2 for calling a global function with example usage: lightly_cli(cfg) and returns: _lightly_cli