<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def conservtion_profile_pid(region, genome_alignment, mi_seqs=MissingSequenceHandler.TREAT_AS_ALL_GAPS, species=None):
 """ build a conservation profile for the given region using the genome alignment. The scores in the profile will be the percent of bases identical to the reference sequence. :param miss_seqs: how to treat sequence with no actual sequence data for the column. :return: a list of the same length as the region where each entry is the PID at the corresponding locus. """

  res = []
  s = region.start if region.isPositiveStrand() else region.end - 1
  e = region.end if region.isPositiveStrand() else region.start - 1
  step = 1 if region.isPositiveStrand() else -1
  for i in range(s, e, step):
    try:
      col = genome_alignment.get_column(region.chrom, i, mi_seqs, species)
      res.append(pid(col))
    except NoSuchAlignmentColumnError:
      res.append(None)
    except NoUniqueColumnError:
      res.append(None)

  return res