code: def get_mxnet_context(gpu_number=0) -> mx.Context:
      """
      Returns either CPU or GPU context.
      """
      if num_gpus():
          logger.info("Using GPU")
          return mx.context.gpu(gpu_number)
      else:
          logger.info("Using CPU")
          return mx.context.cpu()
  
file_path: gluonts/src/gluonts/mx/context.py
imports: import functools
  import logging
  import re
  from typing import Union
  import mxnet
label_desc: Use image node_id 2 for calling a global function with example usage: get_mxnet_context(gpu_number) and returns: mx, mx