code: def update_view(self, view_name, map_func, reduce_func=None, **kwargs):
          
          view = self.get_view(view_name)
          if view is None:
              raise CloudantArgumentError(111, view_name)
          if isinstance(view, QueryIndexView):
              raise CloudantDesignDocumentException(102)
  
          view = View(self, view_name, map_func, reduce_func, **kwargs)
          self.views.__setitem__(view_name, view)
docs: Modifies/overwrites an existing MapReduce view definition in the
          locally cached DesignDocument View dictionary.  To update a JSON
          query index use
          :func:`~cloudant.database.CloudantDatabase.delete_query_index` followed
          by :func:`~cloudant.database.CloudantDatabase.create_query_index`
          instead.  A CloudantException is raised if an attempt to update a
          QueryIndexView (JSON query index) using this method is made.
  
          :param str view_name: Name used to identify the View.
          :param str map_func: Javascript map function.
          :param str reduce_func: Optional Javascript reduce function.