code: def assert_dshape_equal(
      a, b, check_record_order=True, path=None, **kwargs
  ):
      afields = a.fields
      bfields = b.fields
  
      assert len(afields) == len(bfields), (
          "records have mismatched field counts: %d != %d\n%r != %r\n%s"
          % (
              len(afields),
              len(bfields),
              a.names,
              b.names,
              _fmt_path(path),
          )
      )
  
      if not check_record_order:
          afields = sorted(afields)
          bfields = sorted(bfields)
  
      if path is None:
          path = ()
      for n, ((aname, afield), (bname, bfield)) in enumerate(
          zip(afields, bfields)
      ):
          assert aname == bname, (
              "record field name at position %d does not match: %r != %r\n%s"
              % (
                  n,
                  aname,
                  bname,
                  _fmt_path(path),
              )
          )
  
          assert_dshape_equal(
              afield,
              bfield,
              path=path + ("[%s]" % repr(aname),),
              check_record_order=check_record_order,
              **kwargs,
          )
  
file_path: datashader/datashader/datashape/util/testing.py
imports: from abc import ABC
  from ..coretypes import DataShape, DateTime, Function, Option, Record, String, Time, TimeDelta, Tuple, Units
  from ..dispatch import dispatch
label_desc: Use image node_id 10 for calling a global function with example usage: assert_dshape_equal(a, b, check_record_order, path) without return types