Return the index of a subsequence.

		This runs in O(len(sub))

		Args:
			sub (Sequence): An Iterable to search for
		Returns:
			int: The index of the first element of sub
		Raises:
			ValueError: If sub isn't a subsequence
			TypeError: If sub isn't iterable
			IndexError: If start or end are out of range

def sub_index(self, sub, start=0, end=None):
		"""Return the index of a subsequence.

		This runs in O(len(sub))

		Args:
			sub (Sequence): An Iterable to search for
		Returns:
			int: The index of the first element of sub
		Raises:
			ValueError: If sub isn't a subsequence
			TypeError: If sub isn't iterable
			IndexError: If start or end are out of range
		"""
		start_index = self.index(sub[0], start, end)
		end = self._fix_end_index(end)
		if start_index + len(sub) > end:
			raise ValueError
		for i in range(1, len(sub)):
			if sub[i] != self[start_index + i]:
				raise ValueError
		return start_index