code: def _parse_gateway_response(self, response):
      from mlflow.gateway import get_route
  
      route_type = get_route(self.model_route).route_type
  
      if route_type == "llm/v1/completions":
          return response["choices"][0]["text"]
      elif route_type == "llm/v1/chat":
          return response["choices"][0]["message"]["content"]
      else:
          raise MlflowException(
              "Error when parsing gateway response: "
              f"Unsupported route type for _PromptlabModel: {route_type}"
          )
  
file_path: mlflow/mlflow/promptlab/__init__.py
imports: import os
  import re
  from typing import List
  import yaml
  from mlflow.exceptions import MlflowException
  from mlflow.version import VERSION
label_desc: Use image node_id 4 for calling the _PromptlabModel obj's underlying member method code with example usage: obj._parse_gateway_response(response) and returns: response, response