def register_sensors_from_packs(self, base_dirs):
        # Register packs first
        self.register_packs(base_dirs=base_dirs)

        registered_count = 0
        content = self._pack_loader.get_content(base_dirs=base_dirs,
                                                content_type='sensors')

        for pack, sensors_dir in six.iteritems(content):
            if not sensors_dir:
                LOG.debug('Pack %s does not contain sensors.', pack)
                continue
            try:
                LOG.debug('Registering sensors from pack %s:, dir: %s', pack, sensors_dir)
                sensors = self._get_sensors_from_pack(sensors_dir)
                count = self._register_sensors_from_pack(pack=pack, sensors=sensors)
                registered_count += count
            except Exception as e:
                if self._fail_on_failure:
                    raise e

                LOG.exception('Failed registering all sensors from pack "%s": %s', sensors_dir,
                              str(e))

        return registered_count
Discover all the packs in the provided directory and register sensors from all of the
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/bootstrap/sensorsregistrar.py/SensorsRegistrar.register_sensors_from_packs