code: def __init__(
      self,
      model,
      batch_size,
      total_users,
      total_items,
      dim_embed,
      extract_user_lf_func=None,
      extract_item_lf_func=None,
      extract_item_bias_func=None,
  ):
      assert (
          extract_user_lf_func is not None
      ), "Function for user embedding extraction not specified."
      assert (
          extract_item_lf_func is not None
      ), "Function for item embedding extraction not specified."
  
      self._model = model
      self._fastmodel = _FastDotProductRecommender(
          batch_size=batch_size,
          dim_embed=dim_embed,
          total_users=total_users,
          total_items=total_items,
      )
      self._extract_user_lf_func = extract_user_lf_func
      self._extract_item_lf_func = extract_item_lf_func
      self._extract_item_bias_func = extract_item_bias_func
  
      self._user_lf_cache = np.zeros(
          (total_users, dim_embed), dtype=np.float32
      )
      self._item_lf_cache = np.zeros(
          (total_items, dim_embed), dtype=np.float32
      )
      self._item_bias_cache = np.zeros(
          (total_items, 1), dtype=np.float32
      )
  
      self._batch_size = batch_size
      self._total_users = total_users
      self._total_items = total_items
      self._model_updated = False
  
file_path: openrec/openrec/tf1/fast_dot_product_server.py
imports: import numpy
  import tensorflow
  from termcolor import colored
  from openrec.tf1.recommenders import PMF
  from openrec.tf1.modules.extractions import LatentFactor
  import math
label_desc: Use image node_id 1 to create a new FastDotProductServer object from inherited base classes: object with example: obj = FastDotProductServer(model, batch_size, total_users, total_items, dim_embed, extract_user_lf_func, extract_item_lf_func, extract_item_bias_func)