code: def test_widgetlock_zoompan():
      fig, ax = plt.subplots()
      ax.plot([0, 1], [0, 1])
      fig.canvas.widgetlock(ax)
      tb = NavigationToolbar2(fig.canvas)
      tb.zoom()
      assert ax.get_navigate_mode() is None
      tb.pan()
      assert ax.get_navigate_mode() is None
  
imports: import re
  from matplotlib import path, transforms
  from matplotlib.backend_bases import FigureCanvasBase, KeyEvent, LocationEvent, MouseButton, MouseEvent, NavigationToolbar2, RendererBase
  from matplotlib.backend_tools import RubberbandBase
  from matplotlib.figure import Figure
  from matplotlib.testing._markers import needs_pgf_xelatex
  import matplotlib.pyplot
  import numpy
  import pytest
label_desc: Use image node_id 10 for calling a global function with example usage: test_widgetlock_zoompan() without return types