docs: def to_triple(self, ast_obj=None, fmt="medium"):
          """Convert AST object to BEL triple
  
          Args:
              fmt (str): short, medium, long formatted BEL statements
                  short = short function and short relation format
                  medium = short function and long relation format
                  long = long function and long relation format
  
          Returns:
              dict: {'subject': <subject>, 'relation': <relations>, 'object': <object>}
          """
  
          if not ast_obj:
              ast_obj = self
  
          if self.bel_subject and self.bel_relation and self.bel_object:
              if self.bel_relation.startswith("has"):
                  bel_relation = self.bel_relation
              elif fmt == "short":
                  bel_relation = self.spec["relations"]["to_short"].get(
                      self.bel_relation, None
                  )
              else:
                  bel_relation = self.spec["relations"]["to_long"].get(
                      self.bel_relation, None
                  )
  
              bel_subject = self.bel_subject.to_string(fmt=fmt)
  
              if isinstance(self.bel_object, (BELAst)):
                  bel_object = f"({self.bel_object.to_string(fmt=fmt)})"
              else:
                  bel_object = self.bel_object.to_string(fmt=fmt)
  
              return {
                  "subject": bel_subject,
                  "relation": bel_relation,
                  "object": bel_object,
              }
  
          elif self.bel_subject:
              return {"subject": self.bel_subject.to_string(fmt=fmt)}
  
          else:
              return None