import stat


def mode_allows_group_or_other(st_mode):
    """
    Returns True if st_mode bitset has group or other permissions
    :param st_mode: int: bit set from a file
    :return: bool: true when group or other has some permissions
    """
    return (st_mode & stat.S_IRWXO or st_mode & stat.S_IRWXG) != 0