code: def forward(ctx, x, blocks, kwargs):
      ctx.kwargs = kwargs
      for block in blocks:
          x = block(x, **kwargs)
      ctx.y = x.detach()
      ctx.blocks = blocks
      return x
  
imports: from typing import List
  import torch
  import torch.nn
  from torch.autograd.function import Function
  from torch.utils.checkpoint import get_device_states, set_device_states
  from xformers.components import RequiresWrappedInputs
label_desc: Use image node_id 1 for calling the _ReversibleFunction obj's underlying member method code with example usage: obj.forward(ctx, x, blocks, kwargs) and returns: x