```self._write_closing_tag = functools.partial(self.metadata_file_handle.write, closing_tag + '\n')``` is basically what I had in mind, but I suppose that may not work if you depend on the function taking additional arguments and throwing them away.