<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def last(self, limit=1, **kwargs):
 """ Returns the last `limit` records inserted in the model's table in the replica database. Rows are sorted by ``created_at``. """

        return self.collection_instance(
            self.db_adapter(
                db_name=kwargs.get('db'),
                role=kwargs.get('role', 'replica')
                ).select(
                    where='created_at IS NOT NULL',
                    order='created_at DESC',
                    limit=limit
                    )
                )