<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _is_valid_ins(self, ins_ir):
 """Check for instruction validity as a gadgets. """

        invalid_instrs = [
            ReilMnemonic.JCC,
            ReilMnemonic.UNDEF,
            ReilMnemonic.UNKN,
        ]

        return not any([i.mnemonic in invalid_instrs for i in ins_ir])