<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extend_settings(self, data_id, files, secrets):
 """Extend the settings the manager will serialize. :param data_id: The :class:`~resolwe.flow.models.Data` object id being prepared for. :param files: The settings dictionary to be serialized. Keys are filenames, values are the objects that will be serialized into those files. Standard filenames are listed in ``resolwe.flow.managers.protocol.ExecutorFiles``. :param secrets: Secret files dictionary describing additional secret file content that should be created and made available to processes with special permissions. Keys are filenames, values are the raw strings that should be written into those files. """

        data = Data.objects.select_related('process').get(pk=data_id)

        files[ExecutorFiles.DJANGO_SETTINGS].update({
            'USE_TZ': settings.USE_TZ,
            'FLOW_EXECUTOR_TOOLS_PATHS': self.get_tools_paths(),
        })
        files[ExecutorFiles.DATA] = model_to_dict(data)
        files[ExecutorFiles.DATA_LOCATION] = model_to_dict(data.location)
        files[ExecutorFiles.PROCESS] = model_to_dict(data.process)
        files[ExecutorFiles.PROCESS]['resource_limits'] = data.process.get_resource_limits()

        # Add secrets if the process has permission to read them.
        secrets.update(data.resolve_secrets())