@lower_constant(types.Record)
def constant_record(context, builder, ty, pyval):
    lty = ir.ArrayType(ir.IntType(8), pyval.nbytes)
    val = lty(bytearray(pyval.tostring()))
    return cgutils.alloca_once_value(builder, val)


#-------------------------------------------------------------------------------
# Comparisons
Create a record constant as a stack-allocated array of bytes.
dataset/ETHPy150Open numba/numba/numba/targets/arrayobj.py/constant_record