<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filenames(self):
 """ list of file names the data is originally being read from. Returns ------- names : list of str list of file names at the beginning of the input chain. """

        if self._is_reader:
            assert self._filenames is not None
            return self._filenames
        else:
            return self.data_producer.filenames