code: def get_first_rec(fastafile):
      
      f = list(SeqIO.parse(fastafile, "fasta"))
  
      if len(f) > 1:
          logging.debug("{0} records found in {1}, using the first one".
                        format(len(f), fastafile))
  
      return f[0]
docs: Returns the first record in the fastafile