code: def arange(*args, chunks="auto", like=None, dtype=None, **kwargs):
      """
      Return evenly spaced values from `start` to `stop` with step size `step`.
  
      The values are half-open [start, stop), so including start and excluding
      stop. This is basically the same as python's range function but for dask
      arrays.
  
      When using a non-integer step, such as 0.1, the results will often not be
      consistent. It is better to use linspace for these cases.
  
      Parameters
      ----------
      start : int, optional
          The starting value of the sequence. The default is 0.
      stop : int
          The end of the interval, this value is excluded from the interval.
      step : int, optional
          The spacing between the values. The default is 1 when not specified.
          The last value of the sequence.
      chunks :  int
          The number of samples on each block. Note that the last block will have
          fewer samples if ``len(array) % chunks != 0``.
          Defaults to "auto" which will automatically determine chunk sizes.
      dtype : numpy.dtype
          Output dtype. Omit to infer it from start, stop, step
          Defaults to ``None``.
      like : array type or ``None``
          Array to extract meta from. Defaults to ``None``.
  
      Returns
      -------
      samples : dask array
  
      See Also
      --------
      dask.array.linspace
      """
      if len(args) == 1:
          start = 0
          stop = args[0]
          step = 1
      elif len(args) == 2:
          start = args[0]
          stop = args[1]
          step = 1
      elif len(args) == 3:
          start, stop, step = args
      else:
          raise TypeError(
              """
          arange takes 3 positional arguments: arange([start], stop, [step])
          """
          )
  
      num = int(max(np.ceil((stop - start) / step), 0))
  
      meta = meta_from_array(like) if like is not None else None
  
      if dtype is None:
          dtype = np.arange(
              start, stop, step * num if num else step
          ).dtype
  
      chunks = normalize_chunks(chunks, (num,), dtype=dtype)
  
      if kwargs:
          raise TypeError(
              "Unexpected keyword argument(s): %s"
              % ",".join(kwargs.keys())
          )
  
      name = "arange-" + tokenize((start, stop, step, chunks, dtype))
      dsk = {}
      elem_count = 0
  
      for i, bs in enumerate(chunks[0]):
          blockstart = start + (elem_count * step)
          blockstop = start + ((elem_count + bs) * step)
          task = (
              partial(chunk.arange, like=like),
              blockstart,
              blockstop,
              step,
              bs,
              dtype,
          )
          dsk[(name, i)] = task
          elem_count += bs
  
      return Array(dsk, name, chunks, dtype=dtype, meta=meta)
  
imports: from __future__ import annotations
  import itertools
  from collections.abc import Sequence
  from functools import partial
  from itertools import product
  from numbers import Integral, Number
  import numpy
  from tlz import sliding_window
  from dask.array import chunk
  from dask.array.backends import array_creation_dispatch
  from dask.array.core import Array, asarray, block, blockwise, broadcast_arrays, broadcast_to, concatenate, normalize_chunks, stack
  from dask.array.numpy_compat import AxisError
  from dask.array.ufunc import greater_equal, rint
  from dask.array.utils import meta_from_array
  from dask.array.wrap import empty, full, ones, zeros
  from dask.base import tokenize
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import cached_cumsum, derived_from, is_cupy_type
label_desc: Use image node_id 8 for calling a global function with example usage: arange() and returns: Array