def METHOD_NAME(rec1, rec2, rows, name):
    for f in rec1.dtype.names:
        rec1_shape = cast_shape(rec1[f][rows].shape)
        rec2_shape = cast_shape(rec2[f].shape)
        assert rec1_shape == rec2_shape, (
            "testing '%s' field '%s' shapes are equal: "
            "input %s, read: %s" % (
                name, f, rec1_shape, rec2_shape)
        )
        if sys.version_info >= (3, 0, 0) and rec1[f].dtype.char == 'S':
            # for python 3, we get back unicode always
            _rec1frows = rec1[f][rows].astype('U')
        else:
            _rec1frows = rec1[f][rows]
        res = np.where(_rec1frows != rec2[f])
        for w in res:
            assert w.size == 0, "testing column %s" % f