code: def test_exponential_works_properly(self):
      scheduler = LearningRateScheduler.from_params(
          optimizer=Optimizer.from_params(
              model_parameters=self.model.named_parameters(),
              params=Params({"type": "sgd", "lr": 1.0}),
          ),
          params=Params({"type": "exponential", "gamma": 0.5}),
      )
      optimizer = scheduler.lr_scheduler.optimizer
      optimizer.step()  # to avoid a pytorch warning
      # Initial learning rate should be unchanged for first epoch.
      assert optimizer.param_groups[0]["lr"] == 1.0
      scheduler.step()
      assert optimizer.param_groups[0]["lr"] == 0.5
      scheduler.step()
      assert optimizer.param_groups[0]["lr"] == 0.5**2
      scheduler.step()
      assert optimizer.param_groups[0]["lr"] == 0.5**3
  
file_path: allennlp/tests/training/learning_rate_schedulers/learning_rate_scheduler_test.py
imports: import torch
  import pytest
  from allennlp.common.checks import ConfigurationError
  from allennlp.training.optimizers import Optimizer
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.training.learning_rate_schedulers import LearningRateScheduler
  from allennlp.common.params import Params
label_desc: Use image node_id 8 for calling the LearningRateSchedulersTest obj's underlying member method code with example usage: obj.test_exponential_works_properly() without return types