code: def as_native_dev(device: str, /):
      if isinstance(device, mx.Context):
          return device
      if device is None or "cpu" in device:
          mx_dev = "cpu"
      elif "gpu" in device:
          mx_dev = "gpu"
      else:
          raise ValueError(f"dev input {device} not supported.")
      if device.find(":") != -1:
          mx_dev_id = int(device[device.find(":") + 1 :])
      else:
          mx_dev_id = 0
      return mx.Context(mx_dev, mx_dev_id)
  
file_path: ivy/ivy/functional/backends/mxnet/device.py
imports: import mxnet
  from typing import Union, Optional
  import ivy
  from ivy.functional.ivy.device import Profiler
  from ivy.utils.exceptions import IvyNotImplementedException
label_desc: Use image node_id 4 for calling a global function with example usage: as_native_dev() and returns: mx, device