code: def _kmp_search_first(self, pInput_sequence, pPattern):
                  
                  input_sequence, pattern = pInput_sequence, [len(bin(e)) for e in pPattern]
                  n, m = len(input_sequence), len(pattern)
                  d = p = 0
                  next = self._kmp_construct_next(pattern)
                  while d < n and p < m:
                          p = next[len(bin(input_sequence[d]))][p]
                          d += 1
                  if p == m: return d - p
                  else: return -1
docs: use KMP algorithm to search the first occurrence in the input_sequence of the pattern. both arguments are integer arrays. return the position of the occurence if found; otherwise, -1.