def _parse_response(self, response):
        """
        Parse event stream response and return a list of events.
        """
        events = []

        lines = response.strip().split("\n")
        for index, line in enumerate(lines):
            if "data:" in line:
                e_line = lines[index - 1]
                event_name = e_line[e_line.find("event: ") + len("event:") :].strip()
                event_data = line[line.find("data: ") + len("data :") :].strip()

                event_data = json.loads(event_data) if len(event_data) > 2 else {}
                events.append((event_name, event_data))

        return events

        Parse event stream response and return a list of events.
        
st2stream/tests/unit/controllers/v1/test_stream_execution_output.py