<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send_shift_handoff( self, parent, recipients, subject, cc=None, notes_content_type=None, notes_content=None, incidents=None, preview_only=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ):
 """ Sends a summary of the shift for oncall handoff. Example: Args: parent (str):
 The resource name of the Stackdriver project that the handoff is being sent from. for example, ``projects/{project_id}`` recipients (list[str]):
 Email addresses of the recipients of the handoff, for example, "user@example.com". Must contain at least one entry. subject (str):
 The subject of the email. Required. cc (list[str]):
 Email addresses that should be CC'd on the handoff. Optional. notes_content_type (str):
 Content type string, for example, 'text/plain' or 'text/html'. notes_content (str):
 Additional notes to be included in the handoff. Optional. incidents (list[Union[dict, ~google.cloud.irm_v1alpha2.types.Incident]]):
 The set of incidents that should be included in the handoff. Optional. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.irm_v1alpha2.types.Incident` preview_only (bool):
 If set to true a ShiftHandoffResponse will be returned but the handoff will not actually be sent. 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.irm_v1alpha2.types.SendShiftHandoffResponse` 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 "send_shift_handoff" not in self._inner_api_calls:
            self._inner_api_calls[
                "send_shift_handoff"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.send_shift_handoff,
                default_retry=self._method_configs["SendShiftHandoff"].retry,
                default_timeout=self._method_configs["SendShiftHandoff"].timeout,
                client_info=self._client_info,
            )

        request = incidents_service_pb2.SendShiftHandoffRequest(
            parent=parent,
            recipients=recipients,
            subject=subject,
            cc=cc,
            notes_content_type=notes_content_type,
            notes_content=notes_content,
            incidents=incidents,
            preview_only=preview_only,
        )
        if metadata is None:
            metadata = []
        metadata = list(metadata)
        try:
            routing_header = [("parent", parent)]
        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["send_shift_handoff"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )