code: def call(self, features, ragged_output=False):
      # We first convert the id features into embeddings.
      # User embeddings are a [batch_size, embedding_dim] tensor.
      user_embeddings = self.user_embeddings(features["userid"])
  
      # Movie embeddings are a [batch_size, num_movies_in_list, embedding_dim]
      # tensor.
      movie_embeddings = self.movie_embeddings(features["titles"])
  
      # We want to concatenate user embeddings with movie emebeddings to pass
      # them into the ranking model. To do so, we need to reshape the user
      # embeddings to match the shape of movie embeddings.
      list_length = features["titles"].shape[1]
      user_embedding_repeated = tf.repeat(
          tf.expand_dims(user_embeddings, 1), [list_length], axis=1
      )
  
      # Once reshaped, we concatenate and pass into the dense layers to generate
      # predictions.
      concatenated_embeddings = tf.concat(
          [user_embedding_repeated, movie_embeddings], 2
      )
  
      scores = self.score_model(concatenated_embeddings)
      scores = tf.squeeze(scores, axis=-1)
      if ragged_output:
          ragged_length = features["len"]
          ragged_scores = tf.RaggedTensor.from_tensor(
              scores, ragged_length
          )
          return ragged_scores
      else:
          return scores
  
file_path: BigDL/python/friesian/example/listwise_ranking/listwise_pad.py
imports: import os
  import sys
  import math
  from optparse import OptionParser
  import tensorflow
  import tensorflow_ranking
  import tensorflow_recommenders
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.friesian.feature import FeatureTable
  from bigdl.orca.learn.tf2 import Estimator
  from bigdl.orca.data.tf.data import Dataset
  from bigdl.dllib.utils.log4Error import invalidInputError
label_desc: Use image node_id 2 for calling the RankingModel obj's underlying member method code with example usage: obj.call(features, ragged_output) and returns: ragged_scores, scores