code: def declare_state_and_memory(self, previous_state):
      h, w, c = previous_state.shape
      new_shape = (h // 2, w // 2, c)
  
      new_state = replace(previous_state, shape=new_shape)
      mem_allocation = AllocationQuery(new_shape, previous_state.dtype)
      return (new_state, mem_allocation)
  
file_path: ffcv/examples/docs_examples/custom_transform.py
imports: import time
  import numpy
  import torchvision
  from ffcv.fields import IntField, RGBImageField
  from ffcv.fields.decoders import SimpleRGBImageDecoder
  from ffcv.loader import Loader, OrderOption
  from ffcv.pipeline.compiler import Compiler
  from ffcv.pipeline.operation import Operation, AllocationQuery
  from ffcv.transforms import ToTensor
  from ffcv.writer import DatasetWriter
  from dataclasses import replace
label_desc: Use image node_id 2 for calling the PickACorner obj's underlying member method code with example usage: obj.declare_state_and_memory(previous_state) and returns: new_state,  mem_allocation