<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _row_heights2pys(self):
 """Writes row_heights to pys file Format: <row>\t<tab>\t<value>\n """


        for row, tab in self.code_array.dict_grid.row_heights:
            if row < self.code_array.shape[0] and \
               tab < self.code_array.shape[2]:
                height = self.code_array.dict_grid.row_heights[(row, tab)]
                height_strings = map(repr, [row, tab, height])
                self.pys_file.write(u"\t".join(height_strings) + u"\n")