def METHOD_NAME(chaos_mock, spatial_mock, spectral_mock):
    image = coo_matrix([[1.0, 0.9, 0.8], [0.7, 0.0, 0.5]])
    empty_image = coo_matrix([[0.0, 0.0, 0.8], [0.0, 0.0, 0.0]])
    mz_image = coo_matrix([[9.0, 10.0, 11.0], [11.0, 0.0, 9.0]])
    ref_image_items = [
        # first formula first peak only
        FormulaImageItem(1, 0, 10, 100, False, image, mz_image),
        # second formula second peak only
        FormulaImageItem(2, 1, 11, 10, False, image, mz_image),
        # third formula first peak empty image
        FormulaImageItem(3, 0, 10, 100, True, empty_image, empty_image),
        FormulaImageItem(3, 1, 11, 10, True, image, mz_image),
        # fourth formula first peak null
        FormulaImageItem(4, 0, 10, 100, True, None, None),
        FormulaImageItem(4, 1, 11, 10, True, image, mz_image),
        # fifth formula no images
        FormulaImageItem(5, 0, 10, 100, True, None, None),
        FormulaImageItem(5, 1, 11, 10, True, None, None),
    ]
    metrics_df, _ = formula_image_metrics(
        ref_image_items,
        _test_compute_metrics(),
        target_formula_inds={1, 2, 3, 4, 5},
        targeted_database_formula_inds={1, 2, 3, 4, 5},
        n_peaks=2,
        min_px=1,
        compute_unused_metrics=False,
    )
    msm = 0.9 * 0.8 * 0.7
    exp_metrics_df = pd.DataFrame(
        {
            'msm': msm,
            'spectral': 0.9,
            'spatial': 0.8,
            'chaos': 0.7,
        },
        index=pd.Index([1, 2, 3, 4, 5], name='formula_i'),
    )
    obs_metrics_df = metrics_df[['msm', 'spectral', 'spatial', 'chaos']].sort_index()
    assert_frame_equal(obs_metrics_df, exp_metrics_df)