code: def compute_gradients(self, weights):
      self.net.variables.set_flat(weights)
      xs, ys = self.mnist.train.next_batch(self.batch_size)
      return self.net.compute_gradients(xs, ys)
  
file_path: BigDL/python/orca/example/ray_on_spark/parameter_server/sync_parameter_server.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import os
  import numpy
  import ray
  from model import SimpleCNN, download_mnist_retry
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca import OrcaContext
label_desc: Use image node_id 2 for calling the Worker obj's underlying member method code with example usage: obj.compute_gradients(weights) and returns: self