def METHOD_NAME(self):
    """Returns the state of the scheduler as a :class:`dict`.
    It contains an entry for every variable in self.__dict__ which
    is not the optimizer.
    The learning rate lambda functions will only be saved if they are callable objects
    and not if they are functions or lambdas.
    """
    METHOD_NAME = {
        key: value
        for key, value in self.__dict__.items()
        if key not in ("optimizer", "lr_lambdas")
    }
    METHOD_NAME["lr_lambdas"] = [None] * len(self.lr_lambdas)
    for idx, fn in enumerate(self.lr_lambdas):
        if not isinstance(fn, types.FunctionType):
            METHOD_NAME["lr_lambdas"][idx] = fn.__dict__.copy()
    return METHOD_NAME