code: def assert_structure_equals(a, b):
      assert type(a) == type(b), (type(a), type(b))
      assert type(a[0]) == type(b[0]), (
          type(a[0]),
          type(b[0]),
      )  # noqa: E721
      assert a.dtype == b.dtype
      assert a.shape == b.shape
      for i in range(len(a)):
          assert np.array_equiv(a[i], b[i]), (i, a, b)
  
imports: import numpy
  import pytest
  import torch
  import ray
  from ray.air.util.tensor_extensions.utils import create_ragged_ndarray
  from ray.data.tests.conftest import *
  from ray.tests.conftest import *
label_desc: Use image node_id 2 for calling a global function with example usage: assert_structure_equals(a, b) without return types