code: def logspace(
      start: Union[ivy.Array, ivy.NativeArray, float],
      stop: Union[ivy.Array, ivy.NativeArray, float],
      /,
      num: int,
      *,
      base: float = 10.0,
      axis: int = 0,
      endpoint: bool = True,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      device: Optional[Union[ivy.Device, ivy.NativeDevice]] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Generate a certain number of evenly-spaced values in log space, in an
      interval along a given axis.
  
      Parameters
      ----------
      start
          First value in the range in log space. base ** start is the starting value in
          the sequence. Can be an array or a float.
      stop
          Last value in the range in log space. base ** stop is the final value in the
          sequence. Can be an array or a float.
      num
          Number of values to generate.
      base
          The base of the log space. Default is 10.0
      axis
          Axis along which the operation is performed. Relevant only if start or stop are
          array-like. Default is 0.
      endpoint
          If True, stop is the last sample. Otherwise, it is not included. Default is
          True.
      dtype
          The data type of the output tensor. If None, the dtype of on_value is used or if
          that is None, the dtype of off_value is used, or if that is None, defaults to
          float32. Default is None.
      device
          device on which to create the array 'cuda:0', 'cuda:1', 'cpu' etc. Default is
          None.
      out
          optional output array, for writing the result to. It must have a shape that the
          inputs broadcast to. Default is None.
  
      Returns
      -------
      ret
          Tensor of evenly-spaced values in log space.
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
  
      Examples
      --------
      With float input:
  
      >>> print(ivy.logspace(1, 2, 4))
      ivy.array([ 10., 21.5443469, 46.41588834, 100.])
  
      >>> print(ivy.logspace(1, 2, 4, endpoint=False))
      ivy.array([10., 17.7827941, 31.6227766, 56.23413252])
  
      >>> print(ivy.logspace(1, 2, 4, dtype= int))
      ivy.array([ 10.,  10.,  10., 100.])
  
      >>> out = ivy.array([0,0,0,0])
      >>> ivy.logspace(1, 2, 4, out = out)
      >>> print(out)
      ivy.array([ 10,  21,  46, 100])
  
      With :class:`ivy.Array` input:
      >>> x = ivy.array([1, 2])
      >>> y = ivy.array([4, 5])
      >>> print(ivy.logspace(x, y, 4))
      ivy.array([[1.e+01, 1.e+02],
                 [1.e+02, 1.e+03],
                 [1.e+03, 1.e+04],
                 [1.e+04, 1.e+05])
  
      >>> x = ivy.array([1, 2])
      >>> y = ivy.array([4, 5])
      >>> print(ivy.logspace(x, y, 4, axis = 1))
      ivy.array([[[1.e+01, 1.e+02, 1.e+03, 1.e+04],
                 [1.e+02, 1.e+03, 1.e+04, 1.e+05]]])
  
      >>> x = ivy.array([1, 2])
      >>> y = ivy.array([4])
      >>> print(ivy.logspace(x, y, 4))
      ivy.array([[   10.,   100.],
             [  100.,   100.],
             [ 1000.,  1000.],
             [10000., 10000.]])
      """
      result = base ** linspace(
          start,
          stop,
          num,
          endpoint=endpoint,
          axis=axis,
          dtype=dtype,
          device=device,
      )
      if ivy.exists(out):
          return ivy.inplace_update(out, result)
      return result
  
imports: from __future__ import annotations
  import functools
  from numbers import Number
  from typing import Union, Tuple, Optional, List, Sequence, Callable, Protocol, TypeVar, Iterable
  import numpy
  import ivy
  from ivy import to_ivy
  from ivy.utils.exceptions import handle_exceptions
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, infer_dtype, handle_out_argument, outputs_to_ivy_arrays, inputs_to_native_arrays, inputs_to_native_shapes, to_native_arrays_and_back, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid, temp_asarray_wrapper
label_desc: Use image node_id 30 for calling a global function with example usage: logspace(num) and returns: result, ivy