'Parse the for_update arugment of :func:`.select`.
:param mode: Defines the lockmode to use.
``None`` - translates to no lockmode
``\'update\'`` - translates to ``FOR UPDATE``
(standard SQL, supported by most dialects)
``\'nowait\'`` - translates to ``FOR UPDATE NOWAIT``
(supported by Oracle, PostgreSQL 8.1 upwards)
``\'read\'`` - translates to ``LOCK IN SHARE MODE`` (for MySQL),
and ``FOR SHARE`` (for PostgreSQL)
``\'read_nowait\'`` - translates to ``FOR SHARE NOWAIT``
(supported by PostgreSQL). ``FOR SHARE`` and
``FOR SHARE NOWAIT`` (PostgreSQL).'

@classmethod
def parse_legacy_select(self, arg):

    if (arg in (None, False)):
        return None
    nowait = read = False
    if (arg == 'nowait'):
        nowait = True
    elif (arg == 'read'):
        read = True
    elif (arg == 'read_nowait'):
        read = nowait = True
    elif (arg is not True):
        raise exc.ArgumentError(('Unknown    for_update    argument:    %r' % arg))
    return ForUpdateArg(read=read, nowait=nowait)
