def update_instance(
        self,
        name,
        display_name,
        type_,
        labels,
        state=None,
        retry=google.api_core.gapic_v1.method.DEFAULT,
        timeout=google.api_core.gapic_v1.method.DEFAULT,
        metadata=None,
    ):
        """
        Updates an instance within a project.

        Example:
            >>> from google.cloud import bigtable_admin_v2
            >>> from google.cloud.bigtable_admin_v2 import enums
            >>>
            >>> client = bigtable_admin_v2.BigtableInstanceAdminClient()
            >>>
            >>> name = client.instance_path('[PROJECT]', '[INSTANCE]')
            >>>
            >>> # TODO: Initialize `display_name`:
            >>> display_name = ''
            >>>
            >>> # TODO: Initialize `type_`:
            >>> type_ = enums.Instance.Type.TYPE_UNSPECIFIED
            >>>
            >>> # TODO: Initialize `labels`:
            >>> labels = {}
            >>>
            >>> response = client.update_instance(name, display_name, type_, labels)

        Args:
            name (str): (``OutputOnly``) The unique name of the instance. Values are of the form
                ``projects/<project>/instances/[a-z][a-z0-9\\-]+[a-z0-9]``.
            display_name (str): The descriptive name for this instance as it appears in UIs.
                Can be changed at any time, but should be kept globally unique
                to avoid confusion.
            type_ (~google.cloud.bigtable_admin_v2.types.Type): The type of the instance. Defaults to ``PRODUCTION``.
            labels (dict[str -> str]): Labels are a flexible and lightweight mechanism for organizing cloud
                resources into groups that reflect a customer's organizational needs and
                deployment strategies. They can be used to filter resources and
                aggregate metrics.

                -  Label keys must be between 1 and 63 characters long and must conform
                   to the regular expression:
                   ``[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}``.
                -  Label values must be between 0 and 63 characters long and must
                   conform to the regular expression: ``[\p{Ll}\p{Lo}\p{N}_-]{0,63}``.
                -  No more than 64 labels can be associated with a given resource.
                -  Keys and values must both be under 128 bytes.
            state (~google.cloud.bigtable_admin_v2.types.State): (``OutputOnly``) The current state of the instance.
            retry (Optional[google.api_core.retry.Retry]):  A retry object used
                to retry requests. If ``None`` is specified, requests will not
                be retried.
            timeout (Optional[float]): The amount of time, in seconds, to wait
                for the request to complete. Note that if ``retry`` is
                specified, the timeout applies to each individual attempt.
            metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
                that is provided to the method.

        Returns:
            A :class:`~google.cloud.bigtable_admin_v2.types.Instance` instance.

        Raises:
            google.api_core.exceptions.GoogleAPICallError: If the request
                    failed for any reason.
            google.api_core.exceptions.RetryError: If the request failed due
                    to a retryable error and retry attempts failed.
            ValueError: If the parameters are invalid.
        """
        # Wrap the transport method to add retry and timeout logic.
        if "update_instance" not in self._inner_api_calls:
            self._inner_api_calls[
                "update_instance"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.update_instance,
                default_retry=self._method_configs["UpdateInstance"].retry,
                default_timeout=self._method_configs["UpdateInstance"].timeout,
                client_info=self._client_info,
            )

        request = instance_pb2.Instance(
            name=name, display_name=display_name, type=type_, labels=labels, state=state
        )
        if metadata is None:
            metadata = []
        metadata = list(metadata)
        try:
            routing_header = [("name", name)]
        except AttributeError:
            pass
        else:
            routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
                routing_header
            )
            metadata.append(routing_metadata)

        return self._inner_api_calls["update_instance"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )