code: def wait(self, state, timeout=-1):
          
  
          if isinstance(state, str):
              state = state.upper()
  
          return _lxc.Container.wait(self, state, timeout)
docs: Wait for the container to reach a given state or timeout.