<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait(self, state, timeout=-1):
 """ Wait for the container to reach a given state or timeout. """


        if isinstance(state, str):
            state = state.upper()

        return _lxc.Container.wait(self, state, timeout)