<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_rest_models(models, includes=None):
 """ Convert the models into a dict for serialization models should be an array of single model objects that will each be serialized. :return: dict """


    props = {}
    props['data'] = []

    for model in models:
        props['data'].append(_to_rest(model, includes=includes))

    props['included'] = _to_rest_includes(models, includes=includes)

    return props