docs: def replace_ext(filename, new_ext):
      """Replace the file extention."""
      filename_base = os.path.splitext(filename)[0]
      new_filename = '{}.{}'.format(filename_base, new_ext)
      return new_filename