def METHOD_NAME(self):
    sampler = UniformRefFrameSample(
        num_ref_imgs=2, frame_range=[-1, 1], filter_key_img=True)
    results = sampler(self.video_infos)
    assert isinstance(results, dict)
    for key in self.info_keys:
        assert key in results
        assert len(results[key]) == 3
        if key == 'frame_id':
            assert results[key] == [3, 4, 5]
    key_frame_id = self.video_infos['key_frame_id']
    assert (results['img'][1] == np.zeros(
        (self.H, self.W, 3)) + key_frame_id).all()
    assert (results['gt_bboxes'][1] == np.zeros(
        (2, 4)) + key_frame_id).all()
    assert (results['gt_bboxes_labels'][1] == np.zeros(
        (2, )) + key_frame_id).all()
    assert (results['gt_instances_id'][1] == np.zeros(
        (2, )) + key_frame_id).all()
    assert results['ori_shape'][1] == (self.H + key_frame_id,
                                       self.W + key_frame_id)
    assert results['img_id'][1] == key_frame_id
    # test the filter_key_img and the correctness of returned frame index
    sampler = UniformRefFrameSample(
        num_ref_imgs=2, frame_range=[0, 1], filter_key_img=False)
    results = sampler(self.video_infos)
    assert 4 in results['img_id'] and results['img_id'].count(4) == 2
    assert 5 in results['img_id'] and results['img_id'].count(5) == 1
    assert results['key_frame_flags'] == [True, False, False]