code: def test_errors():
      # empty arrays
      with pytest.raises(NotImplementedError) as excpt:
          da.ones([]).to_svg()
      assert "0 dimensions" in str(excpt.value)
  
      # Scalars
      with pytest.raises(NotImplementedError) as excpt:
          da.asarray(1).to_svg()
      assert "0 dimensions" in str(excpt.value)
  
      # 0-length dims arrays
      with pytest.raises(NotImplementedError) as excpt:
          da.ones(10)[:0].to_svg()
      assert "0-length dimensions" in str(excpt.value)
  
      # unknown chunk sizes
      with pytest.raises(NotImplementedError) as excpt:
          x = da.ones(10)
          x = x[x > 5]
          x.to_svg()
      assert "unknown chunk sizes" in str(excpt.value)
  
file_path: dask/dask/array/tests/test_svg.py
imports: from __future__ import annotations
  import xml.etree.ElementTree
  import pytest
  import dask.array
  from dask.array.svg import draw_sizes
label_desc: Use image node_id 4 for calling a global function with example usage: test_errors() without return types