<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_file_sample(self, numLines=10):
 """ retrieve a sample of the file """

        res = ''
        try:
            with open(self.fullname, 'r') as f:
                for line_num, line in enumerate(f):
                    res += str(line_num).zfill(5) + ' ' + line 
                    if line_num >= numLines-1:
                        break
            return res
        except Exception as ex:
            print('cant get_file_sample in "', self.fullname, '":', str(ex))
            return res