<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_format(self, event_iterable):
 """ Formats the given CloudWatch Logs Event dictionary as necessary and returns an iterable that will return the formatted string. This can be used to parse and format the events based on context ie. In Lambda Function logs, a formatter may wish to color the "ERROR" keywords red, or highlight a filter keyword separately etc. This method takes an iterable as input and returns an iterable. It does not immediately format the event. Instead, it sets up the formatter chain appropriately and returns the iterable. Actual formatting happens only when the iterable is used by the caller. Parameters event_iterable : iterable of samcli.lib.logs.event.LogEvent Iterable that returns an object containing information about each log event. Returns ------- iterable of string Iterable that returns a formatted event as a string. """


        for operation in self.formatter_chain:

            # Make sure the operation has access to certain basic objects like colored
            partial_op = functools.partial(operation, colored=self.colored)
            event_iterable = imap(partial_op, event_iterable)

        return event_iterable