    def _lookup_spawner(self, user_name, server_name, raise_404=True):
        """Lookup orm.Spawner for user_name/server_name

        raise 404 if not found
        """
        user = self.find_user(user_name)
        if user and server_name in user.orm_spawners:
            return user.orm_spawners[server_name]
        if raise_404:
            raise web.HTTPError(404, f"No such server: {user_name}/{server_name}")
        else:
            return None
Lookup orm.Spawner for user_name/server_name

raise 404 if not found
jupyterhub/apihandlers/shares.py