<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def state_dict(self) -> Dict[str, Any]: """ Returns the state of the scheduler as a ``dict``. """

        return {key: value for key, value in self.__dict__.items() if key != 'optimizer'}