<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init(self):
 # pylint: disable=too-many-branches """Called by the daemon broker to initialize the module"""

        if not self.enabled:
            logger.info(" the module is disabled.")
            return True

        try:
            connections = self.test_connection()
        except Exception as exp:  # pylint: disable=broad-except
            logger.error("initialization, test connection failed. Error: %s", str(exp))

        if self.influxdb_enabled:
            try:
                # Check that configured TSDB is existing, else creates...
                dbs = self.influx.get_list_database()
                for db in dbs:
                    if db.get('name') == self.influxdb_database:
                        logger.info("the database %s is existing.", self.influxdb_database)
                        break
                else:
                    # Create the database
                    logger.info("creating database %s...", self.influxdb_database)
                    self.influx.create_database(self.influxdb_database)

                # Check that configured TSDB retention is existing, else creates...
                if self.influxdb_retention_name:
                    rps = self.influx.get_list_retention_policies()
                    for rp in rps:
                        if rp.get('name') == self.influxdb_retention_name:
                            logger.info("the retention policy %s is existing.",
                                        self.influxdb_retention_name)
                            break
                    else:
                        # Create a retention policy for this database
                        logger.info("creating database retention policy: %s - %s - %s...",
                                    self.influxdb_retention_name, self.influxdb_retention_duration,
                                    self.influxdb_retention_replication)
                        self.influx.create_retention_policy(
                            self.influxdb_retention_name, self.influxdb_retention_duration,
                            self.influxdb_retention_replication, database=self.influxdb_database)

                # Check that configured TSDB user is existing, else creates...
                if self.influxdb_username:
                    users = self.influx.get_list_users()
                    for user in users:
                        if user.get('user') == self.influxdb_username:
                            logger.info("the user %s is existing.",
                                        self.influxdb_username)
                            break
                    else:
                        # Create a retention policy for this database
                        logger.info("creating user: %s...", self.influxdb_username)
                        self.influx.create_user(self.influxdb_username, self.influxdb_password,
                                                admin=False)

                connections = connections or True
            except Exception as exp:  # pylint: disable=broad-except
                logger.error("InfluxDB, DB initialization failed. Error: %s", str(exp))

        return connections