def METHOD_NAME(trainer, meta):
    trainer._epoch = meta.get('epoch', trainer._epoch)
    trainer._iter = meta.get('iter', trainer._iter)
    trainer._inner_iter = meta.get('inner_iter', trainer._inner_iter)
    i = 0
    for hook in trainer.hooks:
        if hasattr(hook, 'load_state_dict') and getattr(
                hook, '_should_save', True):
            key = f'{hook.__class__}-{i}'
            if key in meta:
                hook.load_state_dict(meta.get(key, {}))
            else:
                trainer.logger.warning(
                    f'The state_dict of hook {hook.__class__} at index {i} is not found in the checkpoint file.'
                )
            i += 1