code: def write(self,
                x: int,
                y: int,
                text: str,
                transposed_text: 'Optional[str]' = None):
          
          entry = self.entries.get((x, y), _DiagramText('', ''))
          self.entries[(x, y)] = _DiagramText(
              entry.text + text,
              entry.transposed_text + (transposed_text if transposed_text
                                       else text))
docs: Adds text to the given location.
  
          Args:
              x: The column in which to write the text.
              y: The row in which to write the text.
              text: The text to write at location (x, y).
              transposed_text: Optional text to write instead, if the text
                  diagram is transposed.