code: def write_rst(self,
                    prefix: str = "",
                    suffix: str = "",
                    heading_underline_char: str = "=",
                    method: AutodocMethod = None,
                    overwrite: bool = False,
                    mock: bool = False) -> None:
          
          content = self.rst_content(
              prefix=prefix,
              suffix=suffix,
              heading_underline_char=heading_underline_char,
              method=method
          )
          write_if_allowed(self.target_rst_filename, content,
                           overwrite=overwrite, mock=mock)
docs: Writes the RST file to our destination RST filename, making any
          necessary directories.
  
          Args:
              prefix: as for :func:`rst_content`
              suffix: as for :func:`rst_content`
              heading_underline_char: as for :func:`rst_content`
              method: as for :func:`rst_content`
              overwrite: overwrite the file if it exists already?
              mock: pretend to write, but don't