human
Solve the following python programming problem given the following code:
def _wait_for_state_change(target_state, ucs_power_handle) : 
    'Wait and check for the power state change.' 
    state = [None] 
    retries = [0] 
    def _wait(state, retries) : 
        state [0] = ucs_power_handle.get_power_state () 
        if ((retries [0] != 0) and (UCS_TO_IRONIC_POWER_STATE.get (state [0]) == target_state)) : 
            raise loopingcall.LoopingCallDone () 
if (retries [0] > CONF.cisco_ucs.max_retry) : 
            state [0] = states.ERROR 
            raise loopingcall.LoopingCallDone () 
retries [0] += 1 
timer = loopingcall.FixedIntervalLoopingCall (_wait, state, retries) 
    timer.start (interval = CONF.cisco_ucs.action_interval).wait () 
    return UCS_TO_IRONIC_POWER_STATE.get (target_state [0], states.ERROR) 

    
    

    Fix the buggy line: return UCS_TO_IRONIC_POWER_STATE.get (target_state [0], states.ERROR)
assistant
#Here is Python code to fix the buggy line: return UCS_TO_IRONIC_POWER_STATE.

return UCS_TO_IRONIC_POWER_STATE.get (state [0], states.ERROR)