docstr: :param obj: object to be decoded
  :return: decoded Sentence object
docstr_tok: [":","param","obj",":","object","to","be","decoded",":","return",":","decoded","Sentence","object"]
code: def decoder(obj):
      """
      :param obj: object to be decoded
      :return: decoded Sentence object
      """
      # SentimentDoc
      if "_doc_text" in obj and "_sentences" in obj:
          return SentimentDoc(obj["_doc_text"], obj["_sentences"])
  
      # SentimentSentence
      if all((attr in obj for attr in ("_start", "_end", "_events"))):
          return SentimentSentence(
              obj["_start"], obj["_end"], obj["_events"]
          )
  
      # Term
      if all(
          attr in obj
          for attr in (
              "_text",
              "_type",
              "_score",
              "_polarity",
              "_start",
              "_len",
          )
      ):
          return Term(
              obj["_text"],
              TermType[obj["_type"]],
              Polarity[obj["_polarity"]],
              obj["_score"],
              obj["_start"],
              obj["_len"],
          )
      return obj
  
imports: import json
  from enum import Enum
  from json import JSONEncoder
label_desc: Use image node_id 7 for calling the SentimentDoc obj's underlying member method code with example usage: obj.decoder(obj) and returns: obj, SentimentDoc, SentimentSentence, Term