@classmethod
def refresh_objects(cls) ->None:
    """
        Reset in-memory changed for django models that are stored as
        class attributes.
        """
    for pk, obj in cls._created_objects:
        obj.pk = pk
        obj.refresh_from_db()
        obj._state.fields_cache.clear()
