code: def test_preserve_container(
      self, monkeypatch: MonkeyPatch, path_type
  ) -> None:
      other_path_type = self.other_path[path_type]
      original_data = list(getattr(sys, path_type))
      original_other = getattr(sys, other_path_type)
      original_other_data = list(original_other)
      new: List[object] = []
      snapshot = SysPathsSnapshot()
      monkeypatch.setattr(sys, path_type, new)
      snapshot.restore()
      assert getattr(sys, path_type) is new
      assert getattr(sys, path_type) == original_data
      assert getattr(sys, other_path_type) is original_other
      assert getattr(sys, other_path_type) == original_other_data
  
imports: import os
  import subprocess
  import sys
  import time
  from types import ModuleType
  from typing import List
  import _pytest.pytester
  import pytest
  from _pytest.config import ExitCode
  from _pytest.config import PytestPluginManager
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import HookRecorder
  from _pytest.pytester import LineMatcher
  from _pytest.pytester import Pytester
  from _pytest.pytester import SysModulesSnapshot
  from _pytest.pytester import SysPathsSnapshot
label_desc: Use image node_id 3 for calling the TestSysPathsSnapshot obj's underlying member method code with example usage: obj.test_preserve_container(monkeypatch, path_type) without return types