def __init__(
        self,
        sensors,
        poll_interval=5,
        single_sensor_mode=False,
        dispatcher=None,
        wrapper_script_path=WRAPPER_SCRIPT_PATH,
        create_token=True,
    ):
        """
        :param sensors: A list of sensor dicts.
        :type sensors: ``list`` of ``dict``

        :param poll_interval: How long to sleep between each poll for running / dead sensors.
        :type poll_interval: ``float``

        :param wrapper_script_path: Path to the sensor wrapper script.
        :type wrapper_script_path: ``str``

        :param create_token: True to create temporary authentication token for the purpose for each
                             sensor process and add it to that process environment variables.
        :type create_token: ``bool``
        """
        self._poll_interval = poll_interval
        self._single_sensor_mode = single_sensor_mode
        self._wrapper_script_path = wrapper_script_path
        self._create_token = create_token

        if self._single_sensor_mode:
            # For more immediate feedback we use lower poll interval when running in single sensor
            # mode
            self._poll_interval = 1

        self._sensors = {}  # maps sensor_id -> sensor object
        self._processes = {}  # maps sensor_id -> sensor process

        self._dispatcher = dispatcher or TriggerDispatcher(LOG)

        self._stopped = False
        self._exit_code = None  # exit code with which this process should exit

        sensors = sensors or []
        for sensor_obj in sensors:
            sensor_id = self._get_sensor_id(sensor=sensor_obj)
            self._sensors[sensor_id] = sensor_obj

        # Stores information needed for respawning dead sensors
        self._sensor_start_times = {}  # maps sensor_id -> sensor start time
        self._sensor_respawn_counts = defaultdict(
            int
        )  # maps sensor_id -> number of respawns

        # A list of all the instance variables which hold internal state information about a
        # particular_sensor
        # Note: We don't clear respawn counts since we want to track this through the whole life
        # cycle of the container manager
        self._internal_sensor_state_variables = [
            self._processes,
            self._sensors,
            self._sensor_start_times,
        ]

        self._enable_common_pack_libs = cfg.CONF.packs.enable_common_libs or False

        :param sensors: A list of sensor dicts.
        :type sensors: ``list`` of ``dict``

        :param poll_interval: How long to sleep between each poll for running / dead sensors.
        :type poll_interval: ``float``

        :param wrapper_script_path: Path to the sensor wrapper script.
        :type wrapper_script_path: ``str``

        :param create_token: True to create temporary authentication token for the purpose for each
                             sensor process and add it to that process environment variables.
        :type create_token: ``bool``
        
st2reactor/st2reactor/container/process_container.py