<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_all(self, find_string, flags):
 """Return list of all positions of event_find_string in MainGrid. Only the code is searched. The result is not searched here. Parameters: gridpos: 3-tuple of Integer \tPosition at which the search starts find_string: String \tString to find in grid flags: List of strings \t Search flag out of \t ["UP" xor "DOWN", "WHOLE_WORD", "MATCH_CASE", "REG_EXP"] """


        code_array = self.grid.code_array
        string_match = code_array.string_match

        find_keys = []

        for key in code_array:
            if string_match(code_array(key), find_string, flags) is not None:
                find_keys.append(key)

        return find_keys