code: def as_native_dev(
      device: Union[ivy.Device, ivy.NativeDevice], /
  ) -> ivy.NativeDevice:
      """Convert device string representation to native device type.
  
      Parameters
      ----------
      device
          The device string to convert to native device handle.
          A native device handle can be passed in instead - in this case
          the unmodified parameter is returned.
  
      Returns
      -------
      ret
          Native device handle.
  
      Examples
      --------
      With :class:`ivy.Device` input:
  
      >>> ivy.set_backend("numpy")
      >>> ivy.as_native_dev("cpu")
      'cpu'
  
      >>> ivy.set_backend("tensorflow")
      >>> ivy.as_native_dev("tpu:3")
      '/TPU:3'
  
      With :class:`ivy.NativeDevice` input:
  
      >>> import torch
      >>> device = torch.device("cuda")
      >>> device
      device(type='cuda')
  
      >>> ivy.as_native_dev(device)
      device(type='cuda')
      """
      return ivy.current_backend().as_native_dev(device)
  
imports: import os
  import gc
  import abc
  import math
  import psutil
  import warnings
  import types
  from typing import Type, Optional, Tuple
  from typing import Union, Callable, Iterable, Any
  import ivy
  from ivy.func_wrapper import handle_out_argument, to_native_arrays_and_back, inputs_to_native_arrays, handle_nestable, handle_array_like_without_promotion, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 11 for calling a global function with example usage: as_native_dev() and returns: ivy