code: def pytest_unconfigure(config: Config) -> None:
      if pastebinfile_key in config.stash:
          pastebinfile = config.stash[pastebinfile_key]
          # Get terminal contents and delete file.
          pastebinfile.seek(0)
          sessionlog = pastebinfile.read()
          pastebinfile.close()
          del config.stash[pastebinfile_key]
          # Undo our patching in the terminal reporter.
          tr = config.pluginmanager.getplugin("terminalreporter")
          del tr._tw.__dict__["write"]
          # Write summary.
          tr.write_sep("=", "Sending information to Paste Service")
          pastebinurl = create_new_paste(sessionlog)
          tr.write_line("pastebin session-log: %s\n" % pastebinurl)
  
file_path: catboost/contrib/python/pytest/py3/_pytest/pastebin.py
imports: import tempfile
  from io import StringIO
  from typing import IO
  from typing import Union
  import pytest
  from _pytest.config import Config
  from _pytest.config import create_terminal_writer
  from _pytest.config.argparsing import Parser
  from _pytest.stash import StashKey
  from _pytest.terminal import TerminalReporter
label_desc: Use image node_id 3 for calling a global function with example usage: pytest_unconfigure(config) without return types