From http://drupalcontrib.org/api/drupal/contributions!entity!includes!entity.property.inc/function/entity_property_values_create_entity/7