lib/usergrid/class_statics.js
function wrap(Class, entity) {
  UsergridEntity.prototype = entity;
  Class._usergrid.constructor.prototype = new UsergridEntity();
  entity = new Class._usergrid.constructor();
  entity._class = Class;
  defineAttributes(entity);
  addConnectionFunctions(entity, Class._usergrid.connections);
  return entity;
}
function wrap(Class, entity) {
  UsergridEntity.prototype = entity;
  Class._usergrid.constructor.prototype = new UsergridEntity();
  entity = new Class._usergrid.constructor();
  entity._class = Class;
  defineAttributes(entity);
  addConnectionFunctions(entity, Class._usergrid.connections);
  return entity;
}
Create a new typed entity from the passed sdk Usergrid.Entity. Assigns prototypes as follows: [defined entity] -> [this UsergridEntity()] -> [sdk Usergrid.Entity()]