code: def save_as(self, name=None, close=False):
          
          current_client = self.get_current_client()
          current_client.save()
          original_path = current_client.get_filename()
          if not name:
              original_name = osp.basename(original_path)
          else:
              original_name = name
          filename, _selfilter = getsavefilename(self, _("Save notebook"),
                                                 original_name, FILES_FILTER)
          if filename:
              nb_contents = nbformat.read(original_path, as_version=4)
              nbformat.write(nb_contents, filename)
              if not close:
                  self.close_client(save=True)
              self.create_new_client(filename=filename)
docs: Save notebook as.