code: def _push_pull(tensor, scope="", name=None):
      """An op which sums an input tensor over all the BytePS processes.
      The reduction operation is keyed by the name of the op. The tensor type and
      shape must be the same on all BytePS processes for a given name. The reduction
      will not start until all processes are ready to send and receive the tensor.
      Returns:
        A tensor of the same shape and type as `tensor`, summed across all
        processes.
      """
      if name is None and not _executing_eagerly():
          name = "BytePSPushPull_%s" % _normalize_name(tensor.name)
      if scope == "" and not _executing_eagerly():
          if "v1" in dir(tf.compat):
              scope = tf.compat.v1.get_default_graph().get_name_scope()
          else:
              scope = tf.get_default_graph().get_name_scope()
          if scope != "":
              scope += "/"
      if not name:
          name = ""
      full_name = scope + name
      if not full_name:
          full_name = "empty_name_" + randomString()
      full_name_ascii = full_name.encode("ascii")
      TF_LIB_CTYPES.byteps_tensorflow_declare_tensor(
          ctypes.c_char_p(full_name_ascii)
      )
      return C_LIB.byteps_push_pull(
          tensor, name=name, input_name=full_name
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import re
  import os
  import ctypes
  from enum import Enum
  import random
  import string
  import warnings
  from tensorflow.python.framework import load_library
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import resource_loader
  from byteps.common import get_ext_suffix
  from byteps.common import BytePSBasics
  from byteps.tensorflow.util import _executing_eagerly
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: _push_pull(tensor, scope, name) and returns: C_LIB