def generic_io_object(self, filename=None, return_path=False, clean=False): ''' Create an io object in a generic way that can work with both file-based and directory-based io objects. If filename is None, create a filename (default). If return_path is True, return the full path of the file along with the io object. return ioobj, path. Default is False. If clean is True, try to delete existing versions of the file before creating the io object. Default is False. ''' return create_generic_io_object(ioclass=self.ioclass, filename=filename, directory=self.local_test_dir, return_path=return_path, clean=clean)