code: def add_help_to_file(item: str, outfile: TextIO, is_command: bool) -> None:
      
      if is_command:
          label = "COMMAND"
      else:
          label = "TOPIC"
  
      header = '{}\n{}: {}\n{}\n'.format(ASTERISKS, label, item, ASTERISKS)
      outfile.write(header)
  
      result = app('help {}'.format(item))
      outfile.write(result.stdout)
docs: Write help text for commands and topics to the output file
      :param item: what is having its help text saved
      :param outfile: file being written to
      :param is_command: tells if the item is a command and not just a help topic