code: def test_thetalim_valid_invalid():
      ax = plt.subplot(projection="polar")
      ax.set_thetalim(0, 2 * np.pi)  # doesn't raise.
      ax.set_thetalim(thetamin=800, thetamax=440)  # doesn't raise.
      with pytest.raises(
          ValueError,
          match="angle range must be less than a full circle",
      ):
          ax.set_thetalim(0, 3 * np.pi)
      with pytest.raises(
          ValueError,
          match="angle range must be less than a full circle",
      ):
          ax.set_thetalim(thetamin=800, thetamax=400)
  
imports: import numpy
  from numpy.testing import assert_allclose
  import pytest
  import matplotlib
  from matplotlib import pyplot
  from matplotlib.testing.decorators import image_comparison, check_figures_equal
label_desc: Use image node_id 26 for calling a global function with example usage: test_thetalim_valid_invalid() without return types