code: def _tensorflow_predict_rest(
      self, vects: Dict[str, "np.ndarray"]
  ) -> Dict[str, "np.ndarray"]:
      if not self.requests_session:
          self.requests_session = requests.Session()
      response = self.requests_session.post(
          f"http://{self.service_settings.tf_serving.host}:"
          f"{self.service_settings.tf_serving.port}"
          f"/v1/models/{self.tf_model_name}:predict",
          data=json.dumps({"inputs": vects}, default=safe_np_dump),
      )
      if response.status_code != 200:  # pragma: no cover
          raise TFServingError(
              f"TF Serving error [{response.reason}]: {response.text}"
          )
      response_json = response.json()
      outputs = response_json["outputs"]
      if not isinstance(outputs, dict):
          # with some (legacy) models, the output is the result, instead of a dict
          return {
              name: np.array(outputs, dtype=self.output_dtypes[name])
              for name in self.output_tensor_mapping
          }
      return {
          name: np.array(outputs[name], dtype=self.output_dtypes[name])
          for name in self.output_tensor_mapping
      }
  
imports: import abc
  import json
  import os
  from typing import Any, Dict, List, Optional, Tuple, Type
  import aiohttp
  import requests
  from structlog import get_logger
  from tenacity import Retrying, retry_if_exception, stop_after_attempt, wait_random_exponential
  from modelkit.core.model import AsyncModel, Model
  from modelkit.core.types import ItemType, ReturnType
  from modelkit.utils.serialization import safe_np_dump
label_desc: Use image node_id 5 for calling the TensorflowModel obj's underlying member method code with example usage: obj._tensorflow_predict_rest(vects) and returns: unknown, unknown