parameters: (self, predicate)
return_statement: return result
docstring: Wait until a predicate becomes true.
  
          The predicate should be a callable which result will be
          interpreted as a boolean value.  The final predicate value is
          the return value.
docstring_summary: Wait until a predicate becomes true.
docstring_tokens: Wait until a predicate becomes true .
function: async def wait_for(self, predicate):
          """Wait until a predicate becomes true.
  
          The predicate should be a callable which result will be
          interpreted as a boolean value.  The final predicate value is
          the return value.
          """
          result = predicate()
          while not result:
              await self.wait()
              result = predicate()
          return result
function_tokens: async def wait_for ( self , predicate ) : result = predicate ( ) while not result : await self . wait ( ) result = predicate ( ) return result