<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mutate_rows( self, table_name, entries, app_profile_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ):
 """ Mutates multiple rows in a batch. Each individual row is mutated atomically as in MutateRow, but the entire batch is not executed atomically. Example: Args: table_name (str):
 The unique name of the table to which the mutations should be applied. entries (list[Union[dict, ~google.cloud.bigtable_v2.types.Entry]]):
 The row keys and corresponding mutations to be applied in bulk. Each entry is applied as an atomic mutation, but the entries may be applied in arbitrary order (even between entries for the same row). At least one entry must be specified, and in total the entries can contain at most 100000 mutations. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.bigtable_v2.types.Entry` app_profile_id (str):
 This value specifies routing for replication. If not specified, the "default" application profile will be used. 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: Iterable[~google.cloud.bigtable_v2.types.MutateRowsResponse]. 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 "mutate_rows" not in self._inner_api_calls:
            self._inner_api_calls[
                "mutate_rows"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.mutate_rows,
                default_retry=self._method_configs["MutateRows"].retry,
                default_timeout=self._method_configs["MutateRows"].timeout,
                client_info=self._client_info,
            )

        request = bigtable_pb2.MutateRowsRequest(
            table_name=table_name, entries=entries, app_profile_id=app_profile_id
        )
        if metadata is None:
            metadata = []
        metadata = list(metadata)
        try:
            routing_header = [("table_name", table_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["mutate_rows"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )