def mxnet_prefer_gpu():
gpu = int(os.environ.get('<STR_LIT>', default=<NUM_LIT:0>))<EOL>if gpu in mx.test_utils.list_gpus():<EOL><INDENT>return mx.gpu(gpu)<EOL><DEDENT>return mx.cpu()<EOL>
If gpu available return gpu, else cpu

    Returns
    -------
    context : Context
        The preferable GPU context.