code: def _compare_arg_caches(self, ac1, ac2):
      consistent = True
      for a1, a2 in zip(ac1, ac2):
          assert type(ac1) == type(ac2)
          if type(ac1) is list or type(ac1) is tuple:
              consistent &= self._compare_arg_caches(a1, a2)
          elif type(ac1) is dict:
              a1_items = [
                  v for _, v in sorted(a1.items(), key=lambda x: x[0])
              ]
              a2_items = [
                  v for _, v in sorted(a2.items(), key=lambda x: x[0])
              ]
              consistent &= self._compare_arg_caches(a1_items, a2_items)
          else:
              consistent &= a1 == a2
  
      return consistent
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/chunk_utils.py
imports: import logging
  import math
  from functools import partial
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple
  import torch
  from .tensor_utils import tensor_tree_map, tree_map
label_desc: Use image node_id 3 for calling the ChunkSizeTuner obj's underlying member method code with example usage: obj._compare_arg_caches(ac1, ac2) and returns: consistent