def sentry_record_alignment(self, rectyp, attr):
        if self.strict_alignment:
            offset = rectyp.offset(attr)
            elemty = rectyp.typeof(attr)
            align = self.get_abi_alignment(self.get_data_type(elemty))
            if offset % align:
                msg = "{rec}.{attr} of type {type} is not aligned".format(
                    rec=rectyp, attr=attr, type=elemty)
                raise TypeError(msg)
Assumes offset starts from a properly aligned location
dataset/ETHPy150Open numba/numba/numba/targets/base.py/BaseContext.sentry_record_alignment