def get_resulting_bitmask(mod_key_names):
    """Return bitmask by reducing all modifier keys with bitwise OR."""

    ### return iterable reduced to a single value...

    return reduce(

        ## with the bitwise OR operation
        bitwise_or,

        ## where the iterable contained the values
        ## of the named modifier keys

        (
            # modifier key value obtained from its name
            getattr(pygame_locals, mod_key_name)

            # modifier key names
            for mod_key_name in mod_key_names
        ),

    )
Return bitmask by reducing all modifier keys with bitwise OR.
nodezator/pygamesetup/services/play.py