code: def save(self, path):
          
          filename = self.get_filename()
          path = os.path.expanduser(path)
          if os.path.isdir(path):
              if filename:
                  basename = os.path.basename(filename)
                  file_ = open(os.path.join(path, basename), "wb")
              else:
                  file_ = tempfile.NamedTemporaryFile(delete=False, dir=path)
          else:
              file_ = open(path, "wb")  # this throws IOErrors for invalid path
          self.write(file_)
          file_.close()
          return file_.name
docs: save the attachment to disk. Uses :meth:`~get_filename` in case path
          is a directory