def get_default_logging_levels(
        cls, fx_name: str, on_step: Optional[bool], on_epoch: Optional[bool]
    ) -> tuple[bool, bool]:
        """Return default logging levels for given hook."""
        fx_config = cls.functions[fx_name]
        assert fx_config is not None
        on_step = fx_config["default_on_step"] if on_step is None else on_step
        on_epoch = fx_config["default_on_epoch"] if on_epoch is None else on_epoch
        return on_step, on_epoch
Return default logging levels for given hook.
src/lightning/pytorch/trainer/connectors/logger_connector/fx_validator.py