def METHOD_NAME(self):
    if not torch.cuda.is_available():
        return
    from mmcv.ops import nms, nms_match
    iou_thr = 0.6
    # empty input
    empty_dets = np.array([])
    assert len(nms_match(empty_dets, iou_thr)) == 0
    # non empty ndarray input
    np_dets = np.array(
        [[49.1, 32.4, 51.0, 35.9, 0.9], [49.3, 32.9, 51.0, 35.3, 0.9],
         [35.3, 11.5, 39.9, 14.5, 0.4], [35.2, 11.7, 39.7, 15.7, 0.3]],
        dtype=np.float32)
    np_groups = nms_match(np_dets, iou_thr)
    assert isinstance(np_groups[0], np.ndarray)
    assert len(np_groups) == 2
    tensor_dets = torch.from_numpy(np_dets)
    boxes = tensor_dets[:, :4]
    scores = tensor_dets[:, 4]
    nms_keep_inds = nms(boxes.contiguous(), scores.contiguous(),
                        iou_thr)[1]
    assert {g[0].item() for g in np_groups} == set(nms_keep_inds.tolist())
    # non empty tensor input
    tensor_dets = torch.from_numpy(np_dets)
    tensor_groups = nms_match(tensor_dets, iou_thr)
    assert isinstance(tensor_groups[0], torch.Tensor)
    for i in range(len(tensor_groups)):
        assert np.equal(tensor_groups[i].numpy(), np_groups[i]).all()
    # input of wrong shape
    wrong_dets = np.zeros((2, 3))
    with pytest.raises(AssertionError):
        nms_match(wrong_dets, iou_thr)