parameters: (x, tf_should_use_helper)
return_statement: return copy_tx(x, tf_should_use_helper)
docstring: Create a wrapper for object x, whose class subclasses type(x).
  
    The wrapper will emit a warning if it is deleted without any of its
    properties being accessed or methods being called.
  
    Args:
      x: The instance to wrap.
      tf_should_use_helper: The object that tracks usage.
  
    Returns:
      An object wrapping `x`, of type `type(x)`.
docstring_summary: Create a wrapper for object x, whose class subclasses type(x).
docstring_tokens: Create a wrapper for object x whose class subclasses type ( x ) .
function: def _get_wrapper(x, tf_should_use_helper):
    """Create a wrapper for object x, whose class subclasses type(x).
  
    The wrapper will emit a warning if it is deleted without any of its
    properties being accessed or methods being called.
  
    Args:
      x: The instance to wrap.
      tf_should_use_helper: The object that tracks usage.
  
    Returns:
      An object wrapping `x`, of type `type(x)`.
    """
    type_x = type(x)
    memoized = _WRAPPERS.get(type_x, None)
    if memoized:
      return memoized(x, tf_should_use_helper)
  
    tx = copy.deepcopy(type_x)
    copy_tx = type(tx.__name__, tx.__bases__, dict(tx.__dict__))
    copy_tx.__init__ = _new__init__
    copy_tx.__getattribute__ = _new__getattribute__
    copy_tx.mark_used = _new_mark_used
    copy_tx.__setattr__ = _new__setattr__
    _WRAPPERS[type_x] = copy_tx
  
    return copy_tx(x, tf_should_use_helper)
function_tokens: def _get_wrapper ( x , tf_should_use_helper ) : type_x = type ( x ) memoized = _WRAPPERS . get ( type_x , None ) if memoized : return memoized ( x , tf_should_use_helper ) tx = copy . deepcopy ( type_x ) copy_tx = type ( tx . __name__ , tx . __bases__ , dict ( tx . __dict__ ) ) copy_tx . __init__ = _new__init__ copy_tx . __getattribute__ = _new__getattribute__ copy_tx . mark_used = _new_mark_used copy_tx . __setattr__ = _new__setattr__ _WRAPPERS [ type_x ] = copy_tx return copy_tx ( x , tf_should_use_helper )