code: def _is_valid_ins(self, ins_ir):
          
          invalid_instrs = [
              ReilMnemonic.JCC,
              ReilMnemonic.UNDEF,
              ReilMnemonic.UNKN,
          ]
  
          return not any([i.mnemonic in invalid_instrs for i in ins_ir])
docs: Check for instruction validity as a gadgets.