def METHOD_NAME(caplog):
    src = fake_3dimage_sct()
    ref = src.copy()
    # Label 1500 is not in the reference image. The label present at [0,0,0] will be missing from the input image
    # This will triggers the warning that we are looking for
    src.data = np.where(src.data == ref.data[0, 0, 0], 1500, ref.data)
    sct_labels.compute_mean_squared_error(src, ref)
    # Cannot use f-string in assert, I needed to create a variable before
    string_form_inp = f'Label mismatch: Labels [{src.data[0,0,0]}] present in input image but missing from reference image.'
    string_form_ref = f'Label mismatch: Labels [{ref.data[0,0,0]}] present in reference image but missing from input image.'
    assert string_form_inp in caplog.text
    assert string_form_ref in caplog.text