code: def from_json(cls, json_value):
      message_type = json_value.get(
          Message.MESSAGE_TYPE
      ) or json_value.get(Message.MESSAGE_NEW_TYPE)
      message_body = json_value.get(
          Message.MESSAGE_BODY
      ) or json_value.get(Message.MESSAGE_NEW_BODY)
  
      if message_type == SIGNAL_TYPE_STOP:
          message_type = MessageType.STOP
      elif message_type == SIGNAL_TYPE_ABORT:
          message_type = MessageType.ABORT
  
      if message_type in MessageClassRegistry.MESSAGE_CLASSES:
          return MessageClassRegistry.MESSAGE_CLASSES[
              message_type
          ].from_json(message_body)
      else:
          raise ValueError(
              "Unknown message type '{}'!".format(message_type)
          )
  
imports: from neptune.attributes.constants import SIGNAL_TYPE_ABORT, SIGNAL_TYPE_STOP
label_desc: Use image node_id 2 for calling the Message obj's underlying member method code with example usage: obj.from_json(cls, json_value) and returns: MessageClassRegistry