code: def test_max_n_locator(n, vmin, vmax, expected):
      locator = MaxNLocator(n)
      ticks = locator.tick_values(vmin, vmax)
      np.testing.assert_almost_equal(ticks, expected)
  
      # Same results if swap vmin and vmax
      ticks = locator.tick_values(vmax, vmin)
      np.testing.assert_almost_equal(ticks, expected)
  
imports: import numpy
  import pytest
  from ...util.locator import MaxNLocator
label_desc: Use image node_id 1 for calling a global function with example usage: test_max_n_locator(n, vmin, vmax, expected) without return types