docs: def patch_plugin(plugin, path, handle=None):
      '''Patches a few attributes of a plugin instance to enable a new call to
      plugin.run()
      '''
      if handle is None:
          handle = plugin.request.handle
      patch_sysargv(path, handle)
      plugin._end_of_directory = False