code: def embed_cli(cfg) -> str:
      """Embed images from the command-line.
  
      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.
          checkpoint:
              Path to the checkpoint of a pretrained model. If left
              empty, a pretrained model by lightly is used.
  
      Returns:
          The path to the created embeddings file.
  
      Examples:
          >>> # embed images with default settings and a lightly model
          >>> lightly-embed input_dir=data/
          >>>
          >>> # embed images with default settings and a custom checkpoint
          >>> lightly-embed input_dir=data/ checkpoint=my_checkpoint.ckpt
          >>>
          >>> # embed images with custom settings
          >>> lightly-embed input_dir=data/ model.num_ftrs=32
  
      """
      return _embed_cli(cfg)
  
file_path: lightly/lightly/cli/embed_cli.py
imports: import os
  from typing import List, Tuple, Union
  import hydra
  import numpy
  import torch
  import torchvision
  from lightly.cli._helpers import cpu_count, fix_hydra_arguments, fix_input_path, get_model_from_config
  from lightly.data import LightlyDataset
  from lightly.utils.hipify import bcolors
  from lightly.utils.io import save_embeddings
label_desc: Use image node_id 2 for calling a global function with example usage: embed_cli(cfg) and returns: _embed_cli