You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: encseq.rb
    path of file: ./repos/genometools/testdata/gtruby
    
    the code of the file until where you have to start completion: #
# Copyright (c) 2010 Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de>
# Copyright (c) 2010 Center for Bioinformatics, University of Hamburg
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS P
    
def run_test_seq_substr_plain(es, seq1, seq2, seq3=nil, seq4=nil)
  start = 3
  stop = 13
  raise unless es.extract_decoded(start, stop) == seq1[start..(stop)]
  start = 0
  stop = 5
  spos = es.seqstartpos(1)
  raise unless es.extract_decoded(spos+start, spos+stop) == seq2[start..(stop)]
  if es.alphabet.is_dna? then
    es.mirror
    spos = es.seqstartpos(2)
    start = 3
    stop = 8
    raise unless es.extract_decoded(start+spos, stop+spos) == seq3[start..(stop)]
    start = 0
    stop = 5
    spos = es.seqstartpos(3)
    raise unless es.extract_decoded(start+spos, stop+spos) == seq4[start..(stop)]
    es.unmirror
  end