def lr_scheduler_step(self, scheduler: LRSchedulerTypeUnion, metric: Optional[Any]) -> None:
        r"""Override this method to adjust the default way the :class:`~lightning.pytorch.trainer.trainer.Trainer` calls
        each scheduler. By default, Lightning calls ``step()`` and as shown in the example for each scheduler based on
        its ``interval``.

        Args:
            scheduler: Learning rate scheduler.
            metric: Value of the monitor used for schedulers like ``ReduceLROnPlateau``.

        Examples::

            # DEFAULT
            def lr_scheduler_step(self, scheduler, metric):
                if metric is None:
                    scheduler.step()
                else:
                    scheduler.step(metric)

            # Alternative way to update schedulers if it requires an epoch value
            def lr_scheduler_step(self, scheduler, metric):
                scheduler.step(epoch=self.current_epoch)

        """
        if metric is None:
            scheduler.step()  # type: ignore[call-arg]
        else:
            scheduler.step(metric)
Override this method to adjust the default way the :class:`~lightning.pytorch.trainer.trainer.Trainer` calls
        each scheduler. By default, Lightning calls ``step()`` and as shown in the example for each scheduler based on
        its ``interval``.

        Args:
            scheduler: Learning rate scheduler.
            metric: Value of the monitor used for schedulers like ``ReduceLROnPlateau``.

        Examples::

            # DEFAULT
            def lr_scheduler_step(self, scheduler, metric):
                if metric is None:
                    scheduler.step()
                else:
                    scheduler.step(metric)

            # Alternative way to update schedulers if it requires an epoch value
            def lr_scheduler_step(self, scheduler, metric):
                scheduler.step(epoch=self.current_epoch)

        
src/lightning/pytorch/core/module.py