code: def _execute_and_seal_error(method, arg, method_name):
      
      try:
          return method(arg)
      except Exception:
          return ray.worker.RayTaskError(method_name, traceback.format_exc())
docs: Execute method with arg and return the result.
  
      If the method fails, return a RayTaskError so it can be sealed in the
      resultOID and retried by user.