code: def create_summary_callback(
      summary_callback_config: DictConfig, trainer_config: DictConfig
  ) -> ModelSummary:
      """Creates a summary callback."""
      # TODO: Drop support for the "weights_summary" argument.
      weights_summary = trainer_config.get("weights_summary", None)
      if weights_summary not in [None, "None"]:
          return _create_summary_callback_deprecated(weights_summary)
      else:
          return _create_summary_callback(
              summary_callback_config["max_depth"]
          )
  
file_path: lightly/lightly/embedding/callbacks.py
imports: import os
  from typing import Optional
  from omegaconf import DictConfig
  from pytorch_lightning.callbacks import ModelCheckpoint, ModelSummary
  from lightly.utils.hipify import print_as_warning
label_desc: Use image node_id 2 for calling a global function with example usage: create_summary_callback(summary_callback_config, trainer_config) and returns: _create_summary_callback_deprecated, _create_summary_callback