def METHOD_NAME(self):
    group_threshold = 2
    group_sizes = (5, 3, 5, 1)
    member_thresholds = (3, 2, 2, 1)
    identifier = slip39.generate_random_identifier()
    mnemonics = slip39.split_ems(
        group_threshold, list(zip(member_thresholds, group_sizes)), identifier, 1, self.EMS
    )
    # Test all valid combinations of mnemonics.
    for groups in combinations(zip(mnemonics, member_thresholds), group_threshold):
        for group1_subset in combinations(groups[0][0], groups[0][1]):
            for group2_subset in combinations(groups[1][0], groups[1][1]):
                mnemonic_subset = list(group1_subset + group2_subset)
                random.shuffle(mnemonic_subset)
                identifier, exponent, ems = slip39.recover_ems(mnemonic_subset)
                self.assertEqual(ems, self.EMS)
    # Minimal sets of mnemonics.
    identifier, exponent, ems = slip39.recover_ems([mnemonics[2][0], mnemonics[2][2], mnemonics[3][0]])
    self.assertEqual(ems, self.EMS)
    self.assertEqual(slip39.recover_ems([mnemonics[2][3], mnemonics[3][0], mnemonics[2][4]])[2], ems)
    # One complete group and one incomplete group out of two groups required.
    with self.assertRaises(slip39.MnemonicError):
        slip39.recover_ems(mnemonics[0][2:] + [mnemonics[1][0]])
    # One group of two required.
    with self.assertRaises(slip39.MnemonicError):
        slip39.recover_ems(mnemonics[0][1:4])