def load_file(self, file_handle, data_set=<NUM_LIT:0>, read_data=True):
file_handle.seek(<NUM_LIT:0>, <NUM_LIT:2>)<EOL>self._file_size = file_handle.tell()<EOL>file_handle.seek(<NUM_LIT:0>)<EOL>data_segments = <NUM_LIT:0><EOL>nextdata_offset = <NUM_LIT:0><EOL>while data_segments <= data_set:<EOL><INDENT>self.read_header(file_handle, nextdata_offset)<EOL>self.read_text(file_handle)<EOL>if '<STR_LIT>' in self.annotation:<EOL><INDENT>data_segments += <NUM_LIT:1><EOL>nextdata_offset = self.annotation['<STR_LIT>']<EOL>file_handle.seek(nextdata_offset)<EOL>if nextdata_offset == <NUM_LIT:0> and data_segments < data_set:<EOL><INDENT>warnings.warn("<STR_LIT>")<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if data_segments != <NUM_LIT:0>:<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL><DEDENT>break<EOL><DEDENT><DEDENT>if read_data:<EOL><INDENT>self.read_data(file_handle)<EOL><DEDENT>
Load the requested parts of the file into memory.