def _get_super_id(line: str, uline: str) ->int:
    """
    parses the superelement header::

        BEGIN SUPER=2
        BEGIN BULK SUPER=2
        BEGIN BULK SUPER = 2
        BEGIN BULK SUPER 2

    """
    if '=' in uline:
        sline = uline.split('=')
        super_id_str = sline[1]
        if len(sline) != 2:
            msg = 'expected "BEGIN SUPER=1"\nline = %s' % line
            raise SyntaxError(msg)
    else:
        sline = uline.split()
        if len(sline) not in [3, 4]:
            msg = 'expected "BEGIN SUPER=1"\nline = %s' % line
            raise SyntaxError(msg)
        if len(sline) == 3:
            super_id_str = sline[2]
        elif len(sline) == 4:
            super_id_str = sline[3]
    try:
        super_id = int(super_id_str)
    except (IndexError, ValueError):
        msg = 'expected "BEGIN SUPER=1"\nline = %s' % line
        raise SyntaxError(msg)
    if super_id < 0:
        raise SyntaxError('super_id=%i must be greater than 0; line=%s' % (
            super_id, line))
    return super_id
