code: def test_pad_3d_data(dtype, pad_widths, mode):
      np_a = np.arange(2 * 3 * 4).reshape(2, 3, 4).astype(dtype)
      da_a = da.from_array(np_a, chunks="auto")
  
      np_r = np.pad(np_a, pad_widths, mode=mode)
      da_r = da.pad(da_a, pad_widths, mode=mode)
  
      assert_eq(np_r, da_r)
  
imports: from __future__ import annotations
  import pytest
  import numpy
  import pytest
  from tlz import concat
  import dask
  import dask.array
  from dask.array.core import normalize_chunks
  from dask.array.numpy_compat import AxisError
  from dask.array.utils import assert_eq, same_keys
label_desc: Use image node_id 31 for calling a global function with example usage: test_pad_3d_data(dtype, pad_widths, mode) without return types