<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_line(self, fid):
 """Read a line from a file string and check it isn't either empty or commented before returning."""

        lin = '#'
        while lin[0] == '#':
            lin = fid.readline().strip()
            if lin == '':
                return lin
        return lin