<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_data(self, **kwargs):
        '''
        Get the measurement data.
        If data is not set, read from 'self.datafile' using 'self.read_data'.
        '''
        if self.queue:
            new = self.apply_queued()
            return new.get_data()
        else:
            return self._get_attr_from_file('data', **kwargs)