code: def is_pretransform_index(index):
      if index.__class__ == faiss.IndexPreTransform:
          assert hasattr(index, "chain")
          return True
      else:
          assert not hasattr(index, "chain")
          return False
  
file_path: faiss/demos/offline_ivf/utils.py
imports: import numpy
  import os
  from typing import Dict
  import yaml
  import faiss
  from faiss.contrib.datasets import SyntheticDataset
label_desc: Use image node_id 6 for calling a global function with example usage: is_pretransform_index(index) and returns: True, False