def is_duplicate(self, rhs):
    '\n        :return boolean: Returns True if the gadgets are a semantic match. Used for non-locality gadget metrics.\n                         Semantic match is defined as the exact same sequence of equivalent instructions.\n        '
    if (len(self.instructions) != len(rhs.instructions)):
        return False
    for i in range(len(self.instructions)):
        if (not self.instructions[i].is_equivalent(rhs.instructions[i])):
            return False
    return True
:return boolean: Returns True if the gadgets are a semantic match. Used for non-locality gadget metrics.
                 Semantic match is defined as the exact same sequence of equivalent instructions.
def is_duplicate(self, rhs):
    '\n        :return boolean: Returns True if the gadgets are a semantic match. Used for non-locality gadget metrics.\n                         Semantic match is defined as the exact same sequence of equivalent instructions.\n        '
    if (len(self.instructions) != len(rhs.instructions)):
        return False
    for i in range(len(self.instructions)):
        if (not self.instructions[i].is_equivalent(rhs.instructions[i])):
            return False
    return True