def METHOD_NAME(set,file_names,params):
  from libtbx import easy_pickle
  print("Number of pickle files found:", len(file_names))
  print()
  returned=0
  from cctbx.sgtbx.bravais_types import bravais_lattice
  ref_bravais_type = bravais_lattice(set.space_group_info().type().number())
  for name in file_names:
    if name=="stats.pickle":continue
    full_path = file_name = op.abspath(name)
    obj = easy_pickle.load(file_name=full_path)
    if "observations" not in obj: continue
    unit_cell = obj["observations"][0].unit_cell()
    result_array = obj["observations"][0]
    #unit_cell, img_miller_indices = obj
    print(file_name,unit_cell, obj["observations"][0].space_group_info())
    if not bravais_lattice(
      obj["observations"][0].space_group_info().type().number()) == ref_bravais_type:
      print("Skipping cell in different Bravais type")
      continue
    if not unit_cell.is_similar_to(
      other=set.unit_cell(),
      relative_length_tolerance=0.1,
      absolute_angle_tolerance=2):
      print("Skipping cell with outlier dimensions")
      continue
    obj["observations"][0].show_summary()
    # Now do manipulate the data to conform to unit cell, asu, and space group of reference
    # Only works if there is NOT an indexing ambiguity!
    ref_setting_obs = obj["observations"][0].customized_copy(crystal_symmetry=set.crystal_symmetry()
      ).resolution_filter(d_min=params.d_min).map_to_asu()
    returned+=1
    yield ref_setting_obs,name
  print("Only %d of %d obs arrays had the correct cell"%(returned,len(file_names)))