<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_daemons(self, daemon_name=None, daemon_type=None):
 """ Get the daemons configuration parameters If name is provided, get the configuration for this daemon, else, If type is provided, get the configuration for all the daemons of this type, else get the configuration of all the daemons. :param daemon_name: the searched daemon name :param daemon_type: the searched daemon type :return: a dict containing the daemon(s) configuration parameters """

        if daemon_name is not None:
            sections = self._search_sections('daemon.%s' % daemon_name)
            if 'daemon.%s' % daemon_name in sections:
                return sections['daemon.' + daemon_name]
            return {}

        if daemon_type is not None:
            sections = self._search_sections('daemon.')
            for name, daemon in list(sections.items()):
                if 'type' not in daemon or not daemon['type'] == daemon_type:
                    sections.pop(name)
            return sections

        return self._search_sections('daemon.')