code: def push_pull(
      tensor,
      average=True,
      name=None,
      version=0,
      priority=0,
      compression=Compression.none,
  ):
      """
      A function that performs averaging or summation of the input tensor over all the
      BytePS processes. The input tensor is not modified. The reduction operation is keyed
      by the name. The name must be provided. 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.
      This acts as a thin wrapper around an autograd function.  If your input
      tensor requires gradients, then callings this function will allow gradients
      to be computed and backpropagated.
      Arguments:
          tensor: A tensor to average and sum.
          average: A flag indicating whether to compute average or summation,
                   defaults to average.
          name: A name of the reduction operation.
          compression: Compression algorithm used during push_pull to reduce the amount
                       of data sent during the each parameter update step.  Defaults to
                       not using compression.
      Returns:
          A tensor of the same shape and type as `tensor`, averaged or summed across all
          processes.
      """
      if name == None:
          raise AssertionError(
              "To manually call push_pull, you must specify a name by name=..."
          )
      tensor_compressed, ctx = compression.compress(tensor)
      summed_tensor_compressed = BytePSPushPull.apply(
          tensor_compressed, average, name, version, priority
      )
      return compression.decompress(summed_tensor_compressed, ctx)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from distutils.version import LooseVersion
  import torch
  from byteps.torch import c_lib
  from byteps.common import BytePSBasics
  from byteps.torch.compression import Compression
label_desc: Use image node_id 7 for calling a global function with example usage: push_pull(tensor, average, name, version, priority, compression) and returns: compression