<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def separator(self, separator=",", end_token=None):
 """ Read through tokens till the required separator is found. We ignore newlines. If an end token is supplied raise a ParseEnd exception if it is found. """

        while True:
            token = self.next()
            t_value = token["value"]
            if end_token and t_value == end_token:
                raise self.ParseEnd()
            if t_value == separator:
                return
            if t_value == "\n":
                continue
            self.error("Unexpected character")