code: def streaming_inference_example():
      """
      The FARM Inferencer has a high performance non-blocking streaming mode for large scale inference use cases. With
      this mode, the dicts parameter can optionally be a Python generator object that yield dicts, thus avoiding loading
      dicts in memory. The inference_from_dicts() method returns a generator that yield predictions. To use streaming,
      set the streaming param to True and determine optimal multiprocessing_chunksize by performing speed benchmarks.
      """
  
      model_name_or_path = "deepset/bert-base-cased-squad2"
      inferencer = Inferencer.load(
          model_name_or_path=model_name_or_path,
          task_type="question_answering",
          num_processes=8,
      )
  
      dicts = (
          sample_dicts_generator()
      )  # it can be a list of dicts or a generator object
      results = inferencer.inference_from_dicts(
          dicts, streaming=True, multiprocessing_chunksize=20
      )
  
      for (
          prediction
      ) in (
          results
      ):  # results is a generator object that yields predictions
          print(prediction)
  
      inferencer.close_multiprocessing_pool()
  
label_desc: Use image node_id 1 for calling a global function with example usage: streaming_inference_example() without return types