def METHOD_NAME(self, tempdir):
    if not tempdir:
        return
    # clean up the temp files we created
    try:
        shutil.rmtree(tempdir)
    except OSError:
        self.stdout.write("Failed to clean up temp files.")
        self.stdout.write(
            "Oh well. ¯\\_(ツ)_/¯ All the important stuff worked."
        )