class_docstr: Container for data that can be used to describe a conversation turn.
  
  The turn is described by a set of attributes such as e.g. `TEXT`  and  `INTENT`
  when describing a user utterance or e.g. `ACTION_NAME` for describing a bot action.
  The container includes raw information (`self.data`) as well as features
  (`self.features`) for each such attribute.
  Moreover, the message has a timestamp and can keep track about information
  on a specific subset of attributes (`self.output_properties`).
docstr: Gets dict representation of message.
docstr_tok: ["Gets","dict","representation","of","message","."]
code: def as_dict(self, only_output_properties: bool = False) -> Dict:
      """Gets dict representation of message."""
      if only_output_properties:
          d = {}
          for key, value in self.data.items():
              if key in self.output_properties:
                  if key == TEXT_TOKENS:
                      d[TEXT_TOKENS] = [(t.start, t.end) for t in value]
                  else:
                      d[key] = value
      else:
          d = self.data
  
      # Filter all keys with None value. These could have come while building the
      # Message object in markdown format
      return {
          key: value for key, value in d.items() if value is not None
      }
  
imports: from typing import Any, Optional, Tuple, Text, Dict, Set, List
  import typing
  import copy
  import rasa.shared.utils.io
  from rasa.shared.exceptions import RasaException
  from rasa.shared.nlu.constants import TEXT, INTENT, RESPONSE, INTENT_RESPONSE_KEY, METADATA, METADATA_INTENT, METADATA_EXAMPLE, ENTITIES, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, RESPONSE_IDENTIFIER_DELIMITER, FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE, ACTION_TEXT, ACTION_NAME, TEXT_TOKENS
  from rasa.shared.constants import DIAGNOSTIC_DATA
label_desc: Use image node_id 7 for calling the Message obj's underlying member method code with example usage: obj.as_dict(only_output_properties) and returns: unknown