code: def hexameter(self, line: str) -> str:
          
          mylist = list(line)
          items = len(mylist)
          idx_start = items - 2
          idx_end = items
          while idx_start > 0:
              potential_foot = "".join(mylist[idx_start: idx_end])
              if potential_foot == self.constants.HEXAMETER_ENDING or \
                              potential_foot == self.constants.SPONDEE:
                  mylist.insert(idx_start, self.constants.FOOT_SEPARATOR)
                  idx_start -= 1
                  idx_end -= 2
              if potential_foot == self.constants.DACTYL:
                  mylist.insert(idx_start, "|")
                  idx_start -= 1
                  idx_end -= 3
              idx_start -= 1
          return "".join(mylist)
docs: Format a string of hexameter metrical stress patterns into foot divisions
  
          :param line: the scansion pattern
          :return: the scansion string formatted with foot breaks
  
          >>> print(ScansionFormatter().hexameter( "-UU-UU-UU---UU--"))
          -UU|-UU|-UU|--|-UU|--