code: def test_learning_rate_expect_user_warning():
      lr_s = lr_scheduler.FactorScheduler(step=1)
      o = mx.optimizer.Optimizer(lr_scheduler=lr_s, learning_rate=0.3)
  
      with pytest.raises(UserWarning):
          o.set_learning_rate(0.5)
  
imports: import itertools
  import numpy
  import itertools
  import mxnet
  import mxnet.lr_scheduler
  from mxnet import gluon
  import unittest
  import pytest
  import math
  from mxnet.test_utils import *
  from common import retry, xfail_when_nonstandard_decimal_separator
label_desc: Use image node_id 2 for calling a global function with example usage: test_learning_rate_expect_user_warning() without return types