code: def echo(*args, **kwargs):
      
      msg = args[:-1]
      path = fs.path(args[-1])
      append = kwargs.pop("append", False)
  
      if append:
          with open(path, "a") as file:
              print(*msg, file=file, **kwargs)
      else:
          with open(fs.path(path), "w") as file:
              print(*msg, file=file, **kwargs)
docs: Write a message to a file.
  
      Arguments:
          args A list of arguments which make up the message. The last argument
              is the path to the file to write to.