import pathlib


def get_auxiliar_file(stem_name: str = '_tmp') -> pathlib.Path:
	"""
	Returns an non-existent path that can be used as auxiliar file.

	Parameters
	----------
	stem_name : str
		A tentative name for the auxiliar file

	Returns
	-------
	out: Pathlib.Path
		The path to the auxiliar file

	"""

	# given name is wrapped in a Pathlib object
	file = pathlib.Path(stem_name)

	# while the file exists...
	while file.exists():

		# ...a '_' is prepended to the name of the file
		file = file.with_name('_' + file.name)

	return file