code: def to_rest_models(models, includes=None):
      
  
      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
docs: Convert the models into a dict for serialization
  
      models should be an array of single model objects that
      will each be serialized.
  
      :return: dict