code: def rewrite_stream_error():
      try:
          yield
      except (
          google.protobuf.json_format.ParseError,
          AttributeError,
      ) as e:
          raise google.api_core.exceptions.BadRequest(
              "Unknown error trying to retrieve streaming response. "
              "Please retry with `stream=False` for more details."
          )
  
imports: from __future__ import annotations
  import collections
  import contextlib
  import sys
  from collections.abc import Iterable, AsyncIterable
  import dataclasses
  import itertools
  import textwrap
  from typing import TypedDict, Union
  import google.protobuf.json_format
  import google.api_core.exceptions
  from google.ai import generativelanguage
  from google.generativeai import string_utils
label_desc: Use image node_id 9 for calling a global function with example usage: rewrite_stream_error() without return types