code: def add_inplace_option(fn):
      """Decorator for inplace option
  
      Functions wrapped by this can have an `inplace` kwarg to use either a copy of
      data or reference"""
  
      @wraps(fn)
      def wrapper(*args, **kwargs):
          """Run input checks"""
          ## convert tuple to list so args can be modified
          args = list(args)
          ## Either make a copy or use a pointer to the original
          if kwargs.get("inplace"):
              args[0] = args[0]
          else:
              args[0] = args[0].copy()
  
          ## function invokation
          return u.execute_fn_with_args_and_or_kwargs(fn, args, kwargs)
  
      return wrapper
  
file_path: impyute/impyute/ops/wrapper.py
imports: from functools import wraps
  import numpy
  from .None import error
  from .None import matrix
  from .None import util
label_desc: Use image node_id 3 for calling a global function with example usage: add_inplace_option(fn) and returns: wrapper, u