code: def update(self):
          
          update_mask_pb = field_mask_pb2.FieldMask()
          if self.display_name is not None:
              update_mask_pb.paths.append("display_name")
          if self.type_ is not None:
              update_mask_pb.paths.append("type")
          if self.labels is not None:
              update_mask_pb.paths.append("labels")
          instance_pb = instance_pb2.Instance(
              name=self.name,
              display_name=self.display_name,
              type=self.type_,
              labels=self.labels,
          )
  
          return self._client.instance_admin_client.partial_update_instance(
              instance=instance_pb, update_mask=update_mask_pb
          )
docs: Updates an instance within a project.
  
          For example:
  
          .. literalinclude:: snippets.py
              :start-after: [START bigtable_update_instance]
              :end-before: [END bigtable_update_instance]
  
          .. note::
  
              Updates any or all of the following values:
              ``display_name``
              ``type``
              ``labels``
              To change a value before
              updating, assign that values via
  
              .. code:: python
  
                  instance.display_name = 'New display name'
  
              before calling :meth:`update`.
  
          :rtype: :class:`~google.api_core.operation.Operation`
          :returns: The long-running operation corresponding to the update
                      operation.