code: def inference_from_objects(
      self,
      objects: List[QAInput],
      return_json=True,
      multiprocessing_chunksize=None,
      streaming=False,
  ) -> Union[List[QAPred], Generator[QAPred, None, None]]:
      dicts = [o.to_dict() for o in objects]
      # TODO investigate this deprecation warning. Timo: I thought we were about to implement Input Objects, then we can and should use inference from (input) objects!
      # logger.warning("QAInferencer.inference_from_objects() will soon be deprecated. Use QAInferencer.inference_from_dicts() instead")
      return self.inference_from_dicts(
          dicts,
          return_json=return_json,
          multiprocessing_chunksize=multiprocessing_chunksize,
          streaming=streaming,
      )
  
imports: import logging
  import multiprocessing
  import os
  from functools import partial
  import warnings
  import torch
  from torch.utils.data.sampler import SequentialSampler
  from tqdm import tqdm
  from typing import Generator, List, Union
  from farm.data_handler.dataloader import NamedDataLoader
  from farm.data_handler.processor import Processor, InferenceProcessor, NaturalQuestionsProcessor
  from farm.data_handler.utils import grouper
  from farm.data_handler.inputs import QAInput
  from farm.modeling.adaptive_model import AdaptiveModel, BaseAdaptiveModel, ONNXAdaptiveModel
  from farm.modeling.optimization import optimize_model
  from farm.utils import initialize_device_settings, MLFlowLogger
  from farm.utils import set_all_seeds, calc_chunksize, log_ascii_workers, Benchmarker
  from farm.modeling.predictions import QAPred
label_desc: Use image node_id 4 for calling the QAInferencer obj's underlying member method code with example usage: obj.inference_from_objects(objects, return_json, multiprocessing_chunksize, streaming) and returns: self