code: def wait(self, pattern, timeout=10.0, safe=False, **match_kwargs):
          
          t = time.time() + timeout
          while time.time() < t:
              ret = self.exists(pattern, **match_kwargs)
              if ret:
                  return ret
              time.sleep(0.2)
          if not safe:
              raise errors.ImageNotFoundError('Not found image %s' %(pattern,))
docs: Wait till pattern is found or time is out (default: 10s).