def group_permissions(self, package, group=None):
        if group is not None:
            key = 'package.%s.group.%s' % (package, group)
            return self._perms_from_short(self._settings.get(key))
        perms = {}
        group_prefix = 'package.%s.group.' % package
        for key, value in self._settings.iteritems():
            if not key.startswith(group_prefix):
                continue
            group = key[len(group_prefix):]
            perms[group] = self._perms_from_short(value)
        return perms
dataset/ETHPy150Open mathcamp/pypicloud/pypicloud/access/config.py/ConfigAccessBackend.group_permissions/original