code: def reset_environment():
      """Resets env variables."""
      init_env = os.environ.copy()
      yield
      changed_env = os.environ
      for key in changed_env:
          if key not in init_env:
              del os.environ[key]
          else:
              os.environ[key] = init_env[key]
  
imports: from __future__ import annotations
  import json
  import os
  import platform
  import subprocess
  import sys
  import warnings
  from contextlib import ExitStack, suppress
  from datetime import datetime, timedelta
  from pathlib import Path
  from typing import TYPE_CHECKING
  import pytest
  import time_machine
  from itsdangerous import URLSafeSerializer
label_desc: Use image node_id 1 for calling a global function with example usage: reset_environment() without return types