code: def _process_result_message(
      message: Union[ResultMessage, ErrorMessage]
  ):
      if isinstance(message, ResultMessage):
          return message.result
      else:
          raise message.as_instanceof_cause()
  
file_path: mars/mars/oscar/backends/context.py
imports: import asyncio
  from dataclasses import dataclass
  from typing import Tuple, Union, Type
  from ...utils import to_binary, dataslots
  from ..api import Actor
  from ..core import ActorRef, create_local_actor_ref
  from ..context import BaseActorContext
  from ..debug import debug_async_timeout, detect_cycle_send
  from ..errors import CannotCancelTask
  from ..utils import create_actor_ref
  from .allocate_strategy import AllocateStrategy, AddressSpecified
  from .core import ActorCaller
  from .message import DEFAULT_PROTOCOL, new_message_id, _MessageBase, ResultMessage, ErrorMessage, CreateActorMessage, HasActorMessage, DestroyActorMessage, ActorRefMessage, SendMessage, CancelMessage, ControlMessage, ControlMessageType
  from .router import Router
label_desc: Use image node_id 3 for calling the MarsActorContext obj's underlying member method code with example usage: obj._process_result_message(message) and returns: message