code: def locate(self, pattern):
          '''Find sequences matching a pattern.
  
          :param pattern: Sequence for which to find matches.
          :type pattern: str
          :returns: Indices of pattern matches.
          :rtype: list of ints
  
          '''
          if len(pattern) > len(self):
              raise ValueError('Search pattern longer than searchable ' +
                               'sequence.')
          seq = self.seq
  
          pattern = str(pattern).upper()
          re_pattern = '(?=' + pattern + ')'
          matches = [index.start() % len(self) for index in
                     re.finditer(re_pattern, seq)]
  
          return matchef locate(self, pattern):
          '''Find sequences matching a pattern.
  
          :param pattern: Sequence for which to find matches.
          :type pattern: str
          :returns: Indices of pattern matches.
          :rtype: list of ints
  
          '''
          if len(pattern) > len(self):
              raise ValueError('Search pattern longer than searchable ' +
                               'sequence.')
          seq = self.seq
  
          pattern = str(pattern).upper()
          re_pattern = '(?=' + pattern + ')'
          matches = [index.start() % len(self) for index in
                     re.finditer(re_pattern, seq)]
  
          return matches
docs: Find sequences matching a pattern.
  
          :param pattern: Sequence for which to find matches.
          :type pattern: str
          :returns: Indices of pattern matches.
          :rtype: list of ints