code: def _make_broadcast_group_fn():
      if _executing_eagerly():
          # Eager mode will parallelize independent control flow
          def broadcast_group(variables, root_rank):
              for var in sorted(variables, key=__name__):
                  var.assign(broadcast(var, root_rank))
  
          if hasattr(tf, "function"):
              # TensorFlow 1.14.0+
              return tf.function(broadcast_group)
          else:
              return tf.contrib.eager.defun(broadcast_group)
      else:
          # Graph mode requires an Op
          def broadcast_group(variables, root_rank):
              return tf.group(
                  *[
                      var.assign(broadcast(var, root_rank))
                      for var in variables
                  ]
              )
  
          return broadcast_group
  
imports: import tensorflow
  from bluefog.tensorflow.mpi_ops import allreduce, broadcast, size
  from bluefog.tensorflow.util import _executing_eagerly, _cache
label_desc: Use image node_id 2 for calling a global function with example usage: _make_broadcast_group_fn() and returns: broadcast_group, tf, tf, tf