code: def full_grad(theta):
      theta_id = ray.put(theta)
      grad_ids = [actor.grad.remote(theta_id) for actor in actors]
      # The float64 conversion is necessary for use with fmin_l_bfgs_b.
      return sum(ray.get(grad_ids)).astype("float64")
  
file_path: ray/doc/source/ray-core/examples/lbfgs/driver.py
imports: import os
  import numpy
  import scipy.optimize
  import tensorflow
  from tensorflow.examples.tutorials.mnist import input_data
  import ray
  import ray.experimental.tf_utils
label_desc: Use image node_id 2 for calling a global function with example usage: full_grad(theta) and returns: sum