code: def add_sys_path(dir):
      sys.path[:0] = [str(dir)]
      try:
          yield
      finally:
          sys.path.remove(str(dir))
  
imports: import os
  import sys
  import copy
  import json
  import shutil
  import pathlib
  import tempfile
  import textwrap
  import functools
  import contextlib
  from test.support.os_helper import FS_NONASCII
  from test.support import requires_zlib
  from .None import _path
  from ._path import FilesSpec
label_desc: Use image node_id 1 for calling the OnSysPath obj's underlying member method code with example usage: obj.add_sys_path(dir) without return types