code: def text_to_pango(self):
          
          def replace(s):
              s = s.split("&")
              out = s[0]
              for i in range(len(s) - 1):
                  if s[i + 1].startswith("amp;"):
                      out += "&" + s[i + 1]
                  else:
                      out += "&amp;" + s[i + 1]
              return out
  
          if "full_text" in self.output.keys():
              self.output["full_text"] = replace(self.output["full_text"])
          if "short_text" in self.output.keys():
              self.output["short_text"] = replace(self.output["short_text"])
docs: Replaces all ampersands in `full_text` and `short_text` attributes of
          `self.output` with `&amp;`.
  
          It is called internally when pango markup is used.
  
          Can be called multiple times (`&amp;` won't change to `&amp;amp;`).