def crosscheck_variant_group(self, variants):
assert all(isinstance(v, hgvs.sequencevariant.SequenceVariant) for v in variants)<EOL>variants = sorted(variants, key=lambda v: v.type)<EOL>binned_variants = {k: [] for k in "<STR_LIT>"}<EOL>binned_variants.update(<EOL>{g: list(gi)<EOL>for g, gi in itertools.groupby(variants, lambda v: v.type)})<EOL>binned_variants["<STR_LIT:t>"] = binned_variants["<STR_LIT:c>"] + binned_variants["<STR_LIT:n>"]<EOL>assert len(binned_variants["<STR_LIT:g>"]) == len(<EOL>[v.ac for v in binned_variants["<STR_LIT:g>"]]), "<STR_LIT>"<EOL>for g_var in binned_variants["<STR_LIT:g>"]:<EOL><INDENT>for t_var in binned_variants["<STR_LIT:t>"]:<EOL><INDENT>try:<EOL><INDENT>r = self.vm.g_to_t(g_var, t_var.ac)<EOL><DEDENT>except HGVSDataNotAvailableError:<EOL><INDENT>continue<EOL><DEDENT>if t_var != r:<EOL><INDENT>return "<STR_LIT>".format(<EOL>g_var=g_var, t_var=t_var, r=r)<EOL><DEDENT><DEDENT><DEDENT>for t_var in binned_variants["<STR_LIT:t>"]:<EOL><INDENT>for g_var in binned_variants["<STR_LIT:g>"]:<EOL><INDENT>try:<EOL><INDENT>r = self.vm.t_to_g(t_var, g_var.ac)<EOL><DEDENT>except HGVSDataNotAvailableError:<EOL><INDENT>continue<EOL><DEDENT>if g_var != r:<EOL><INDENT>return "<STR_LIT>".format(<EOL>g_var=g_var, t_var=t_var, r=r)<EOL><DEDENT><DEDENT><DEDENT>if binned_variants["<STR_LIT:p>"]:<EOL><INDENT>for c_var in binned_variants["<STR_LIT:c>"]:<EOL><INDENT>try:<EOL><INDENT>r = self.vm.c_to_p(c_var)<EOL><DEDENT>except HGVSDataNotAvailableError:<EOL><INDENT>continue<EOL><DEDENT>r.posedit.uncertain = False<EOL>if isinstance(r.posedit.edit, hgvs.edit.AAFs):<EOL><INDENT>r.posedit.edit.length = None    <EOL><DEDENT>if r not in binned_variants["<STR_LIT:p>"]:<EOL><INDENT>return "<STR_LIT>".format(<EOL>c_var=c_var, p_vars="<STR_LIT:U+0020>".join(map(str, binned_variants["<STR_LIT:p>"])), r=r)<EOL><DEDENT><DEDENT><DEDENT>return None<EOL>
crosscheck a group of variants; returns None if successful, otherwise a message