code: async def begin(request: web.Request) -> web.Response:
      
      if None is not session_from_request(request):
          LOG.warning("begin: requested with active session")
          return web.json_response(
              data={'message':
                    'An update session is already active on this robot',
                    'error': 'session-already-active'},
              status=409)
  
      session = UpdateSession(os.path.join(constants.DATA_DIR_NAME,
                                           'migration-updates'))
      request.app[SESSION_VARNAME] = session
      return web.json_response(
          data={'token': session.token},
          status=201)
docs: Begin a session