<human>:  Can you show me a Python function to limit y axis in Python.
<bot>: Here is a Python function to limit y axis in Pythonplot

import matplotlib.pyplot as plt

def limit_y_axis(ax, ymin, ymax):
  """
  Limit y axis in pyplot.

  :param ax: pyplot axis
  :type ax: matplotlib.pyplot.axis
  :param ymin: minimum value
  :type ymin: float
  :param ymax: maximum value
  :type ymax: float
  :return: None
  """
  ax.set_ylim(ymin, ymax)

# Enter the axis
ax = plt.gca()

# Enter the minimum value
ymin = -10

# Enter the maximum value
ymax = 10

# Calling the function
print((limit_y_axis(ax, ymin, ymax)))

#Example Output
# None

#Remember to inspect code for bugs.