def METHOD_NAME(self):
    try:
        sdfg = dace.SDFG('ok')
        s1 = sdfg.add_state('also_ok')
        s2 = sdfg.add_state('also_ok')
        s2.set_label('also_ok')
        sdfg.add_edge(s1, s2, dace.InterstateEdge())
        sdfg.validate()
        self.fail('Failed to detect duplicate state')
    except dace.sdfg.InvalidSDFGError as ex:
        print('Exception caught:', ex)