def wait_for_array(self, wait_for, timeout_ms):
        """Waits for one or more events to happen.
        Scriptable version of :py:func:`wait_for` .

        in wait_for of type :class:`ProcessWaitForFlag`
            Specifies what to wait for;
            see :py:class:`ProcessWaitForFlag`  for more information.

        in timeout_ms of type int
            Timeout (in ms) to wait for the operation to complete.
            Pass 0 for an infinite timeout.

        return reason of type :class:`ProcessWaitResult`
            The overall wait result;
            see :py:class:`ProcessWaitResult`  for more information.

        """
        if not isinstance(wait_for, list):
            raise TypeError("wait_for can only be an instance of type list")
        for a in wait_for[:10]:
            if not isinstance(a, ProcessWaitForFlag):
                raise TypeError(
                        "array can only contain objects of type ProcessWaitForFlag")
        if not isinstance(timeout_ms, baseinteger):
            raise TypeError("timeout_ms can only be an instance of type baseinteger")
        reason = self._call("waitForArray",
                     in_p=[wait_for, timeout_ms])
        reason = ProcessWaitResult(reason)
        return reason
Waits for one or more events to happen.
        Scriptable version of :py:func:`wait_for` .

        in wait_for of type :class:`ProcessWaitForFlag`
            Specifies what to wait for;
            see :py:class:`ProcessWaitForFlag`  for more information.

        in timeout_ms of type int
            Timeout (in ms) to wait for the operation to complete.
            Pass 0 for an infinite timeout.

        return reason of type :class:`ProcessWaitResult`
            The overall wait result;
            see :py:class:`ProcessWaitResult`  for more information.