code: def get_current_device(device=False):
      if has_gpu and device == True:
          return mx.gpu(kv.local_rank)
      else:
          return mx.current_device()
  
file_path: mxnet/tests/nightly/dist_device_sync_kvstore_byteps.py
imports: import sys
  import mxnet
  import numpy
  import numpy.random
  import time
  import argparse
  from mxnet.log import get_logger
  import logging
  from mxnet.kvstore import BytePS
label_desc: Use image node_id 2 for calling a global function with example usage: get_current_device(device) and returns: mx, mx