<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create(self, **attributes):
 """ Create a collection of models and persist them to the database. :param attributes: The models attributes :type attributes: dict :return: mixed """

        results = self.make(**attributes)

        if self._amount == 1:
            if self._resolver:
                results.set_connection_resolver(self._resolver)

            results.save()
        else:
            if self._resolver:
                results.each(lambda r: r.set_connection_resolver(self._resolver))

            for result in results:
                result.save()

        return results