def _get_ctx(self):
        """return correct context , priority: gpu > cpu

        Returns
        -------
        ctx: mx.context
        """
        if has_gpu():
            return mx.gpu()
        else:
            return mx.cpu()
return correct context , priority: gpu > cpu

        Returns
        -------
        ctx: mx.context
        
python/magent/builtin/mx_model/base.py