def create_entity(self, model_obj):
entity_type = ContentType.objects.get_for_model(model_obj)<EOL>return Entity.objects.create(<EOL>entity_type=entity_type, entity_id=model_obj.id,<EOL>entity_kind=EntityKind.objects.get_or_create(<EOL>name='<STR_LIT>'.format(entity_type.app_label, entity_type.model),<EOL>defaults={'<STR_LIT>': u'<STR_LIT>'.format(entity_type)}<EOL>)[<NUM_LIT:0>])<EOL>
Given a model object, create an entity.