code: def wait_for_array(self, wait_for, timeout_ms):
          
          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, GuestSessionWaitForFlag):
                  raise TypeError(
                          "array can only contain objects of type GuestSessionWaitForFlag")
          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 = GuestSessionWaitResult(reason)
          return reason
docs: Waits for one or more events to happen.
          Scriptable version of :py:func:`wait_for` .
  
          in wait_for of type :class:`GuestSessionWaitForFlag`
              Specifies what to wait for;
              see :py:class:`GuestSessionWaitForFlag`  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:`GuestSessionWaitResult`
              The overall wait result;
              see :py:class:`GuestSessionWaitResult`  for more information.