def create_summary_callback(
    summary_callback_config: DictConfig, trainer_config: DictConfig
) -> ModelSummary:
    """Creates a model summary callback based on the configuration.

    Args:
        summary_callback_config:
            Configuration dictionary for the summary callback.
        trainer_config:
            Trainer configuration dictionary, which may include deprecated `weights_summary`.

    Returns:
        ModelSummary: The model 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"])
Creates a model summary callback based on the configuration.

    Args:
        summary_callback_config:
            Configuration dictionary for the summary callback.
        trainer_config:
            Trainer configuration dictionary, which may include deprecated `weights_summary`.

    Returns:
        ModelSummary: The model summary callback.

    
lightly/embedding/callbacks.py