code: function (CurrentEntity) {
    return function (attributeValues) {
      expect(arguments).to.have.length.below(
        2,
        'Invalid arguments length when creating a new "' +
        CurrentEntity.specification.name +
        '" instance (it has to be passed less than 2 arguments)');
  
      return new Promise(function (resolve, reject) {
        var newEntity = new CurrentEntity(attributeValues);
  
        newEntity
          .save({
            forceCreate: true
          })
          .then(function () {
            resolve(newEntity);
          })
          .catch(reject);
      });
    };
  }
docs: Private function used to get the create function specific for the current
  Entity class.
  @name module:back4app-entity/models.Entity~_getCreateFunction
  @function
  @param {!Class} CurrentEntity The current entity class for which the new
  function will be created.
  @returns {function} The new function.
  @private
  @example
  Entity.create = _getCreateFunction(Entity);