class_docstr: This is where BytePS's DistributedOptimizer wrapper for MXNet goes
class_docstr_tok: ["This","is","where","BytePS","'s","DistributedOptimizer","wrapper","for","MXNet","goes"]
code: def _do_push_pull_param(self, index, delta_weight):
      if isinstance(index, (tuple, list)):
          for i in range(len(index)):
              byteps_declare_tensor("weight_" + str(index[i]))
              byteps_push_pull(
                  delta_weight[i],
                  version=0,
                  priority=-index[i],
                  name="weight_" + str(index[i]),
                  is_average=False,
              )
      else:
          byteps_declare_tensor("weight_" + str(index))
          byteps_push_pull(
              delta_weight,
              version=0,
              priority=-index,
              name="weight_" + str(index),
              is_average=False,
          )
  
imports: from __future__ import absolute_import, division, print_function
  import copy
  import os
  import struct
  import warnings
  import mxnet
  import mxnet.ndarray
  from byteps.mxnet.compression import Compression
  from byteps.mxnet.ops import byteps_declare_tensor, byteps_push_pull, init, local_rank, local_size, rank, resume, shutdown, size, suspend
label_desc: Use image node_id 5 for calling the DistributedOptimizer obj's underlying member method code with example usage: obj._do_push_pull_param(index, delta_weight) without return types