docs: def save_to_file(destination_filename, append=False):
      """
      Save the output value to file.
      """
  
      def decorator_fn(f):
          @wraps(f)
          def wrapper_fn(*args, **kwargs):
              res = f(*args, **kwargs)
  
              makedirs(os.path.dirname(destination_filename))
              mode = "a" if append else "w"
              with open(destination_filename, mode) as text_file:
                  text_file.write(res)
  
              return res
  
          return wrapper_fn
  
      return decorator_fn