def _delete_instructions(self, instruction, value=None):
        """
        :param instruction: name of instruction to be deleted
        :param value: if specified, delete instruction only when it has this value
                      if instruction is LABEL then value is label name
        """
        if instruction == 'LABEL' and value:
            self._modify_instruction_label(value, None)
            return
        if instruction == 'ENV' and value:
            self._modify_instruction_env(value, None)
            return

        lines = self.lines
        deleted = False
        for insn in reversed(self.structure):
            if insn['instruction'] == instruction:
                if value and insn['value'] != value:
                    continue
                deleted = True
                del lines[insn['startline']:insn['endline'] + 1]
        if deleted:
            self.lines = lines
def _delete_instructions ( self , instruction , value = None ) : if instruction == 'LABEL' and value : self . _modify_instruction_label ( value , None ) return if instruction == 'ENV' and value : self . _modify_instruction_env ( value , None ) return lines = self . lines deleted = False for insn in reversed ( self . structure ) : if insn [ 'instruction' ] == instruction : if value and insn [ 'value' ] != value : continue deleted = True del lines [ insn [ 'startline' ] : insn [ 'endline' ] + 1 ] if deleted : self . lines = lines
:param instruction: name of instruction to be deleted
        :param value: if specified, delete instruction only when it has this value
                      if instruction is LABEL then value is label name