docs: def _to_ctfile(self):
          """Convert :class:`~ctfile.ctfile.CTfile` into `CTfile` formatted string.
  
          :return: ``CTfile`` formatted string.
          :rtype: :py:class:`str`.
          """
          output = io.StringIO()
  
          for key in self:
              if key == 'HeaderBlock':
                  for line in self[key].values():
                      output.write(line)
                      output.write('\n')
  
              elif key == 'Ctab':
                  ctab_str = self[key]._to_ctfile()
                  output.write(ctab_str)
  
              else:
                  raise KeyError('Molfile object does not supposed to have any other information: "{}".'.format(key))
  
          return output.getvalue()