code: def run_inference(self, inference_pipeline, args, kwargs):
      session_id = kwargs.pop("session_id", None)
      if session_id:
          args = self.preprocess_session(session_id, args)
      response = inference_pipeline(*args, **kwargs)
  
      if session_id:
          response = self.postprocess_session(
              session_id, args, response
          )
  
      return response
  
imports: import uuid
  from abc import ABC, abstractmethod
  from transformers import Conversation
  from mii.legacy.constants import TaskType
  from mii.legacy.grpc_related.proto import legacymodelresponse_pb2
  from mii.legacy.utils import kwarg_dict_to_proto, unpack_proto_query_kwargs
  from mii.legacy.models.utils import ImageResponse
label_desc: Use image node_id 5 for calling the TextGenerationMethods obj's underlying member method code with example usage: obj.run_inference(inference_pipeline, args, kwargs) and returns: response