def entity_to_props(entity):
    """Converts a Datastore Entity into props

    Converts a ndb.Model Entity into its props form. The props form
    contains all of the properties within the entity as a dict. The props
    form also contains a 'kind' that points to the string form
    of the matching class. The `props` form also contains a 'key'
    that contains the entity.key() object.
    """
    d = entity.to_dict()
    if entity.key:
        d['key'] = entity.key
    d['kind'] = entity._get_kind()
    return d
