    async def apply_group_overrides(self):
        """
        Apply group overrides before starting a server
        """
        user_group_names = {g.name for g in self.user.groups}
        if callable(self.group_overrides):
            group_overrides = await maybe_future(self.group_overrides(self))
        else:
            group_overrides = self.group_overrides
        for key in sorted(group_overrides):
            go = group_overrides[key]
            if user_group_names & set(go['groups']):
                # If there is *any* overlap between the groups user is in
                # and the groups for this override, apply overrides
                self.log.info(
                    f"Applying group_override {key} for {self.user.name}, modifying config keys: {' '.join(go['spawner_override'].keys())}"
                )
                self._apply_overrides(go['spawner_override'])
Apply group overrides before starting a server
jupyterhub/spawner.py