code: def compute_loss(self, features, training=False):
      labels = features.pop("ratings")
  
      scores = self(features)
  
      return self.task(
          labels=labels,
          predictions=tf.squeeze(scores, axis=-1),
      )
  
file_path: BigDL/python/friesian/example/listwise_ranking/listwise_ranking.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 3 for calling the RankingModel obj's underlying member method code with example usage: obj.compute_loss(features, training) and returns: self