<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _expand_data(self, old_data, new_data, group):
 """ data expansion - uvision needs filename and path separately. """

        for file in old_data:
            if file:
                extension = file.split(".")[-1].lower()
                if extension in self.file_types.keys():
                    new_data['groups'][group].append(self._expand_one_file(normpath(file),
                                                                           new_data, extension))
                else:
                    logger.debug("Filetype for file %s not recognized" % file)
        if hasattr(self, '_expand_sort_key'):
            new_data['groups'][group] = sorted(new_data['groups'][group],
                                               key=self._expand_sort_key)