class_docstr: Smart sdist that finds anything supported by revision control
class_docstr_tok: ["Smart","sdist","that","finds","anything","supported","by","revision","control"]
docstr: In a context, remove and restore os.link if it exists
docstr_tok: ["In","a","context",",","remove","and","restore","os.link","if","it","exists"]
code: def _remove_os_link():
      """
      In a context, remove and restore os.link if it exists
      """
  
      class NoValue:
          pass
  
      orig_val = getattr(os, "link", NoValue)
      try:
          del os.link
      except Exception:
          pass
      try:
          yield
      finally:
          if orig_val is not NoValue:
              setattr(os, "link", orig_val)
  
imports: from distutils import log
  import distutils.command.sdist
  import os
  import sys
  import contextlib
  from itertools import chain
  from .._importlib import metadata
  from .build import _ORIGINAL_SUBCOMMANDS
label_desc: Use image node_id 5 for calling the sdist obj's underlying member method code with example usage: obj._remove_os_link() without return types