docs: def to_string(self, ast_obj=None, fmt: str = "medium") -> str:
          """Convert AST object to string
  
          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
              canonicalize
  
          Returns:
              str: string version of BEL AST
          """
  
          if not ast_obj:
              ast_obj = self
  
          bel_relation = None
          if self.bel_relation and fmt == "short":
              bel_relation = self.spec["relations"]["to_short"].get(
                  self.bel_relation, self.bel_relation
              )
          elif self.bel_relation:
              bel_relation = self.spec["relations"]["to_long"].get(
                  self.bel_relation, self.bel_relation
              )
  
          if self.bel_subject and bel_relation and self.bel_object:
              if isinstance(self.bel_object, BELAst):
                  return "{} {} ({})".format(
                      self.bel_subject.to_string(fmt=fmt),
                      bel_relation,
                      self.bel_object.to_string(fmt=fmt),
                  )
              else:
                  return "{} {} {}".format(
                      self.bel_subject.to_string(fmt=fmt),
                      bel_relation,
                      self.bel_object.to_string(fmt=fmt),
                  )
  
          elif self.bel_subject:
              return "{}".format(self.bel_subject.to_string(fmt=fmt))
  
          else:
              return ""