class_docstr: Wrap 'os' module and 'open()' builtin for virtualizing setup scripts
class_docstr_tok: ["Wrap","'os","'","module","and","'open","(",")","'","builtin","for","virtualizing","setup","scripts"]
code: def _mk_query(name):
      original = getattr(_os, name)
  
      def wrap(self, *args, **kw):
          retval = original(*args, **kw)
          if self._active:
              return self._remap_output(name, retval)
          return retval
  
      return wrap
  
imports: import os
  import sys
  import tempfile
  import operator
  import functools
  import itertools
  import re
  import contextlib
  import pickle
  import textwrap
  import builtins
  import pkg_resources
  from distutils.errors import DistutilsError
  from pkg_resources import working_set
label_desc: Use image node_id 9 for calling the AbstractSandbox obj's underlying member method code with example usage: obj._mk_query(name) and returns: wrap, retval, self