code: def extract_secs(self, tx, tx_in_idx):
          
          sc = tx.SolutionChecker(tx)
          tx_context = sc.tx_context_for_idx(tx_in_idx)
          # set solution_stack in case there are no results from puzzle_and_solution_iterator
          solution_stack = []
          for puzzle_script, solution_stack, flags, sighash_f in sc.puzzle_and_solution_iterator(tx_context):
              for opcode, data, pc, new_pc in self._script_tools.get_opcodes(puzzle_script):
                  if data and is_sec(data):
                      yield data
              for data in solution_stack:
                  if is_sec(data):
                      yield data
docs: For a given script solution, iterate yield its sec blobs