code: def __init__(
      self,
      n_users,
      n_items,
      vocab,
      global_mean,
      n_factors=32,
      embedding_size=100,
      id_embedding_size=32,
      attention_size=16,
      kernel_sizes=[3],
      n_filters=64,
      dropout_rate=0.5,
      max_text_length=50,
      max_num_review=32,
      pretrained_word_embeddings=None,
      verbose=False,
      seed=None,
  ):
      self.n_users = n_users
      self.n_items = n_items
      self.n_vocab = vocab.size
      self.global_mean = global_mean
      self.n_factors = n_factors
      self.embedding_size = embedding_size
      self.id_embedding_size = id_embedding_size
      self.attention_size = attention_size
      self.kernel_sizes = kernel_sizes
      self.n_filters = n_filters
      self.dropout_rate = dropout_rate
      self.max_text_length = max_text_length
      self.max_num_review = max_num_review
      self.verbose = verbose
      if seed is not None:
          self.rng = get_rng(seed)
          tf.random.set_seed(seed)
  
      embedding_matrix = uniform(
          shape=(self.n_vocab, self.embedding_size),
          low=-0.5,
          high=0.5,
          random_state=self.rng,
      )
      embedding_matrix[:4, :] = np.zeros((4, self.embedding_size))
      if pretrained_word_embeddings is not None:
          oov_count = 0
          for word, idx in vocab.tok2idx.items():
              embedding_vector = pretrained_word_embeddings.get(word)
              if embedding_vector is not None:
                  embedding_matrix[idx] = embedding_vector
              else:
                  oov_count += 1
          if self.verbose:
              print("Number of OOV words: %d" % oov_count)
  
      embedding_matrix = initializers.Constant(embedding_matrix)
      self.graph = Model(
          self.n_users,
          self.n_items,
          self.n_vocab,
          embedding_matrix,
          self.global_mean,
          self.n_factors,
          self.embedding_size,
          self.id_embedding_size,
          self.attention_size,
          self.kernel_sizes,
          self.n_filters,
          self.dropout_rate,
          self.max_text_length,
      )
  
imports: import numpy
  import tensorflow
  from tensorflow import keras
  from tensorflow.keras import layers, initializers, Input
  from tensorflow.python.keras.preprocessing.sequence import pad_sequences
  from ...utils import get_rng
  from ...utils.init_utils import uniform
label_desc: Use image node_id 1 to create a new NARREModel object  with example: obj = NARREModel(n_users, n_items, vocab, global_mean, n_factors, embedding_size, id_embedding_size, attention_size, kernel_sizes, n_filters, dropout_rate, max_text_length, max_num_review, pretrained_word_embeddings, verbose, seed)