Load a profile by name

        Called by load_user_options

def _load_profile(self, profile_name):
        """Load a profile by name

        Called by load_user_options
        """

        # find the profile
        default_profile = self._profile_list[0]
        for profile in self._profile_list:
            if profile.get('default', False):
                # explicit default, not the first
                default_profile = profile

            if profile['display_name'] == profile_name:
                break
        else:
            if profile_name:
                # name specified, but not found
                raise ValueError("No such profile: %s. Options include: %s" % (
                    profile_name, ', '.join(p['display_name'] for p in self._profile_list)
                ))
            else:
                # no name specified, use the default
                profile = default_profile

        self.log.debug("Applying KubeSpawner override for profile '%s'", profile['display_name'])
        kubespawner_override = profile.get('kubespawner_override', {})
        for k, v in kubespawner_override.items():
            if callable(v):
                v = v(self)
                self.log.debug(".. overriding KubeSpawner value %s=%s (callable result)", k, v)
            else:
                self.log.debug(".. overriding KubeSpawner value %s=%s", k, v)
            setattr(self, k, v)