code: def num_ivy_arrays_on_dev(
      device: Union[ivy.Device, ivy.NativeDevice], /
  ) -> int:
      """Return the number of arrays which are currently alive on the specified
      device.
  
      Parameters
      ----------
      device
          The device handle from which to count the arrays
  
      Returns
      -------
      ret
          Number of arrays on the specified device
  
      Examples
      --------
      >>> x1 = ivy.array([-1, 0, 5.2])
      >>> x2 = ivy.array([-1, 0, 5.2, 4, 5])
      >>> y = ivy.num_ivy_arrays_on_dev(ivy.default_device())
      >>> print(y)
      2
  
      >>> x1 = ivy.native_array([-1, 0, 5.2])
      >>> y = ivy.num_ivy_arrays_on_dev(ivy.default_device())
      >>> print(y)
      0
  
      >>> x = ivy.Container(x1=ivy.array([-1]),
      ...                   x2=ivy.native_array([-1]))
      >>> y = ivy.num_ivy_arrays_on_dev(ivy.default_device())
      >>> print(y)
      1
      """
      return len(ivy.get_all_ivy_arrays_on_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 5 for calling a global function with example usage: num_ivy_arrays_on_dev() and returns: len