title: Using db.allocate_id_range?
body: <p>The manual doesn't have an example how to use db.allocate_id_range. I tried some code and it failed, esxpecially for webapp2:s User model which is an ndb expando model. What I want to do is just create a User entity with an ID number of my choice so I try to use db.allocate_id_range but it is not working:</p>
  
  <pre><code>BadArgumentError: Expected an instance or iterable of (&lt;class 'google.appengine.
  ext.db.Model'&gt;, &lt;class 'google.appengine.api.datastore_types.Key'&gt;, &lt;type 'bases
  tring'&gt;); received User&lt;address=StringProperty('address'), auth_ids=StringProper
  ty('auth_ids', repeated=True), created=DateTimeProperty('created', auto_now_add=
  True), firstname=StringProperty('firstname'), lastname=StringProperty('lastname'
  ), notify=BooleanProperty('notify', default=False), notify_sms=BooleanProperty('
  notify_sms', default=False), password=StringProperty('password'), phone_cell=Str
  ingProperty('phone_cell'), registered=BooleanProperty('registered', default=Fals
  e), sponsor=KeyProperty('sponsor'), updated=DateTimeProperty('updated', auto_now
  =True)&gt; (a MetaModel).
  </code></pre>
  
  <p>The way I try to do it is like this</p>
  
  <p><code>first_batch = db.allocate_id_range(User, 3001, 3001) #try allocate ID 3001</code></p>
  
  <p>Am I doing it wrong? I also tried putting the model name in quotes but that didn't work either. How should I be doing this? Thanks for any advice.</p>