code: def _check_missing_model(enroll, test, ndx):
      # Remove missing models and test segments
      clean_ndx = ndx.filter(enroll.modelset, test.segset, True)
  
      # Align StatServers to match the clean_ndx
      enroll.align_models(clean_ndx.modelset)
      test.align_segments(clean_ndx.segset)
  
      return clean_ndx
  
imports: import numpy
  import copy
  import pickle
  from scipy import linalg
label_desc: Use image node_id 4 for calling a global function with example usage: _check_missing_model(enroll, test, ndx) and returns: clean_ndx