def convert_axes(plt, which_axes='current'):
	"""Saves current working plot and axes as variables for testing purposes.
	Axes that is/are saved is denoted by which_axes.

	parameters:
	---------
	plt: Matplotlib plot to be tested
	which_axes: string from the following list ['current', 'last', 'first', 'all'] stating which axes we are saving for testing

	returns:
	--------
	ax: Matplotlib axes or list of axes as express by which_axes
	"""
	fig = plt.gcf()
	if which_axes == 'current':
		ax = fig.gca()
	elif which_axes == 'last':
		ax = fig.axes[-1]
	elif which_axes == 'first':
		ax = fig.axes[0]
	elif which_axes == 'all':
		ax = fig.axes
	else: 
		raise ValueError('which_axes must be one of the following strings ["current", "last", "first", "all"]')
	return ax