def _normalize_fields(cls, fields):
        """
        fields:
            [name: str,
             value: {
                 type: Type,
                 offset: int,
                 [ alignment: int ],
                 [ title : str],
             }]
        """
        res = []
        for name, infos in sorted(fields, key=lambda x: (x[1]['offset'], x[0])):
            fd = _RecordField(
                type=infos['type'],
                offset=infos['offset'],
                alignment=infos.get('alignment'),
                title=infos.get('title'),
            )
            res.append((name, fd))
        return res

        fields:
            [name: str,
             value: {
                 type: Type,
                 offset: int,
                 [ alignment: int ],
                 [ title : str],
             }]
        
numba/core/types/npytypes.py