code: def __infer_stream2(stub, model_name, sequence_id, expected):
      request_iterator = iter(
          [
              inference_pb2.PredictionsRequest(
                  model_name=model_name,
                  input={"data": 1},
                  sequence_id=sequence_id,
              ),
              inference_pb2.PredictionsRequest(
                  model_name=model_name,
                  input={"data": 2},
                  sequence_id=sequence_id,
              ),
              inference_pb2.PredictionsRequest(
                  model_name=model_name,
                  input={"data": 3},
                  sequence_id=sequence_id,
              ),
          ]
      )
      responses_iterator = stub.StreamPredictions2(request_iterator)
  
      prediction = []
      for resp in responses_iterator:
          prediction.append(resp.prediction.decode("utf-8"))
  
      assert str(" ".join(prediction)) == expected
  
file_path: serve/test/pytest/test_gRPC_inference_api.py
imports: import json
  import os
  import threading
  from ast import literal_eval
  import inference_pb2
  import management_pb2
  import test_gRPC_utils
  import test_utils
label_desc: Use image node_id 8 for calling a global function with example usage: __infer_stream2(stub, model_name, sequence_id, expected) without return types