code: def init_kv_compressed(kv, compression="2bit", threshold=0.5):
      kv.set_gradient_compression(
          {"type": compression, "threshold": threshold}
      )
      # init kv compression keys
      for k, s in compr_keys_shapes:
          kv.init(k, mx.nd.zeros(s))
      # to test inactive mode
      for k, s in compr_init_keys_shapes:
          kv.init(k, mx.nd.ones(s))
      return kv, threshold
  
file_path: mxnet/tests/nightly/dist_sync_kvstore.py
imports: import sys
  import argparse
  import mxnet
  import numpy
  import numpy.random
  from mxnet.test_utils import assert_almost_equal, assert_exception
  from test_kvstore import compute_expected_quantization, compute_1bit, compute_2bit
label_desc: Use image node_id 4 for calling a global function with example usage: init_kv_compressed(kv, compression, threshold) and returns: kv,  threshold