def _get_sessions_in_a_conference(self, websafe_key):
     """Given a request with a websafeConferenceKey, returns all the sessions in the Conference"""
     # get an ndbKey from the webkey
     try:
         ndbKey = ndb.Key(urlsafe=websafe_key)
     except Exception as a:
         # key is not a valid ndbKey
         raise endpoints.NotFoundException(
             'No conference found with key: %s' % websafe_key)
     # get the Conference object
     conf = ndbKey.get()
     if not conf:
         raise endpoints.NotFoundException(
             'No conference found with key: %s' % websafe_key)
     return Session.get_sessions_by_conference(ndbKey)