def _configure_schedulers_manual_opt(schedulers: list) -> list[LRSchedulerConfig]:
    """Convert each scheduler into `LRSchedulerConfig` structure with relevant information, when using manual
    optimization."""
    lr_scheduler_configs = []
    for scheduler in schedulers:
        if isinstance(scheduler, dict):
            # interval is not in this list even though the user needs to manually call the scheduler because
            # the `LearningRateMonitor` callback needs to check its value to know when to log the learning rate
            invalid_keys = {"reduce_on_plateau", "monitor", "strict"}
            keys_to_warn = [k for k in scheduler if k in invalid_keys]

            if keys_to_warn:
                rank_zero_warn(
                    f"The lr scheduler dict contains the key(s) {keys_to_warn}, but the keys will be ignored."
                    " You need to call `lr_scheduler.step()` manually in manual optimization.",
                    category=RuntimeWarning,
                )

            config = LRSchedulerConfig(**{key: scheduler[key] for key in scheduler if key not in invalid_keys})
        else:
            config = LRSchedulerConfig(scheduler)
        lr_scheduler_configs.append(config)
    return lr_scheduler_configs
Convert each scheduler into `LRSchedulerConfig` structure with relevant information, when using manual
    optimization.
src/lightning/pytorch/core/optimizer.py