async def create_or_get(self, model_, **kwargs):
try:<EOL><INDENT>return (await self.create(model_, **kwargs)), True<EOL><DEDENT>except IntegrityErrors:<EOL><INDENT>query = []<EOL>for field_name, value in kwargs.items():<EOL><INDENT>field = getattr(model_, field_name)<EOL>if field.unique or field.primary_key:<EOL><INDENT>query.append(field == value)<EOL><DEDENT><DEDENT>return (await self.get(model_, *query)), False<EOL><DEDENT>
Try to create new object with specified data. If object already
        exists, then try to get it by unique fields.