docs: def save(self, output=''):
          """Save the document.
          If no output is provided the file will be saved in the same location. Otherwise output
          can determine a target directory or file.
          """
          self.file = self._get_output_file(output)
          with open(self.file, 'w', encoding='utf-8') as f:
              self.write(f)