code: def _rev_config(config, flag: bool):
      for c in filter(
          lambda x: x["block_type"] == "encoder",
          config,
      ):
          c["reversible"] = flag
  
      return config
  
file_path: xformers/tests/test_reversible.py
imports: import random
  import pytest
  import torch
  from xformers.factory.model_factory import xFormer, xFormerConfig
label_desc: Use image node_id 1 for calling a global function with example usage: _rev_config(config, flag) and returns: config