code: def svg(chunks, size=200, **kwargs):
      """Convert chunks from Dask Array into an SVG Image
  
      Parameters
      ----------
      chunks: tuple
      size: int
          Rough size of the image
  
      Returns
      -------
      text: An svg string depicting the array as a grid of chunks
      """
      shape = tuple(map(sum, chunks))
      if np.isnan(shape).any():  # don't support unknown sizes
          raise NotImplementedError(
              "Can't generate SVG with unknown chunk sizes.\n\n"
              " A possible solution is with x.compute_chunk_sizes()"
          )
      if not all(shape):
          raise NotImplementedError(
              "Can't generate SVG with 0-length dimensions"
          )
      if len(chunks) == 0:
          raise NotImplementedError(
              "Can't generate SVG with 0 dimensions"
          )
      if len(chunks) == 1:
          return svg_1d(chunks, size=size, **kwargs)
      elif len(chunks) == 2:
          return svg_2d(chunks, size=size, **kwargs)
      elif len(chunks) == 3:
          return svg_3d(chunks, size=size, **kwargs)
      else:
          return svg_nd(chunks, size=size, **kwargs)
  
file_path: dask/dask/array/svg.py
imports: from __future__ import annotations
  import math
  import re
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: svg(chunks, size) and returns: svg_1d, svg_2d, svg_3d, svg_nd