code: def user_id_partition_keygen(request_envelope):
      # type: (RequestEnvelope) -> str
      
      try:
          user_id = request_envelope.context.system.user.user_id
          return user_id
      except AttributeError:
          raise PersistenceException("Couldn't retrieve user id from request "
                                     "envelope, for partition key use")
docs: Retrieve user id from request envelope, to use as partition key.
  
      :param request_envelope: Request Envelope passed during skill
          invocation
      :type request_envelope: ask_sdk_model.RequestEnvelope
      :return: User Id retrieved from request envelope
      :rtype: str
      :raises: :py:class:`ask_sdk_core.exceptions.PersistenceException`