code: def main(cfg: CLIConfig) -> None:
      """CLI entrypoint, takes in all the configurations, instantiates a scheduler, reads the input
      data into a DataFrame using the supplied `Reader`, profiles the data using the
      `DefaultProfiler`, the results of which are supplied to `HtmlReport` and then write the HTML to
      the output file or stream.
  
      Args:
           cfg (CLIConfig): CLI configurations.
      """
      scheduler = Scheduler(cfg.scheduler)
      cfg.input = hydra.utils.to_absolute_path(cfg.input)
      cfg.reader.path = cfg.input
      reader = hydra.utils.instantiate(cfg.reader)
      df = reader.read()
      # solves pickling and improves speed
      pcfg = yaml.load(
          OmegaConf.to_yaml(cfg.profiler), Loader=yaml.FullLoader
      )
      profiler = DefaultProfiler(config=pcfg, scheduler=scheduler)
      report = HtmlReport(
          df=df, meta={}, profiler=profiler, scheduler=scheduler
      )
      if cfg.output:
          report.save(
              hydra.utils.to_absolute_path(cfg.output),
              mode="w",
              encoding="utf-8",
          )
      else:
          print(report.save())
  
file_path: tslumen/tslumen/cli/__init__.py
imports: from typing import List, Any, Optional
  import warnings
  from dataclasses import dataclass, field
  import yaml
  import hydra
  from hydra.core.config_store import ConfigStore
  from omegaconf import MISSING, OmegaConf
  from tslumen.scheduling import Scheduler
  from tslumen.cli.readers import Reader, ReaderCsv, ReaderFwf, ReaderExcel
  from tslumen.profile import DefaultProfiler
  from tslumen.report import HtmlReport
label_desc: Use image node_id 1 for calling a global function with example usage: main(cfg) without return types