def METHOD_NAME(self):
    gt_instances = InstanceData()
    gt_instances.masks = torch.randint(0, 2, (2, 10, 10)).long()
    gt_instances.labels = torch.LongTensor([1, 20])
    pred_instances = InstanceData()
    pred_instances.masks = torch.rand((4, 10, 10))
    pred_instances.scores = torch.rand((4, 25))
    img_meta = dict(img_shape=(10, 10))
    # test DiceCost
    assigner = HungarianAssigner(dict(type='DiceCost'))
    assign_result = assigner.assign(
        pred_instances, gt_instances, img_meta=img_meta)
    self.assertTrue(torch.all(assign_result.gt_inds > -1))
    self.assertEqual((assign_result.gt_inds > 0).sum(),
                     gt_instances.masks.size(0))
    self.assertEqual((assign_result.labels > -1).sum(),
                     gt_instances.masks.size(0))
    # test CrossEntropyLossCost
    assigner = HungarianAssigner(dict(type='CrossEntropyLossCost'))
    assign_result = assigner.assign(
        pred_instances, gt_instances, img_meta=img_meta)
    self.assertTrue(torch.all(assign_result.gt_inds > -1))
    self.assertEqual((assign_result.gt_inds > 0).sum(),
                     gt_instances.masks.size(0))
    self.assertEqual((assign_result.labels > -1).sum(),
                     gt_instances.masks.size(0))
    # test FocalLossCost
    assigner = HungarianAssigner(
        dict(type='FocalLossCost', binary_input=True))
    assign_result = assigner.assign(
        pred_instances, gt_instances, img_meta=img_meta)
    self.assertTrue(torch.all(assign_result.gt_inds > -1))
    self.assertEqual((assign_result.gt_inds > 0).sum(),
                     gt_instances.masks.size(0))
    self.assertEqual((assign_result.labels > -1).sum(),
                     gt_instances.masks.size(0))