<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def survival_events_from_table(survival_table, observed_deaths_col="observed", censored_col="censored"):
 """ This is the inverse of the function ``survival_table_from_events``. Parameters survival_table: DataFrame a pandas DataFrame with index as the durations and columns "observed" and "censored", referring to the number of individuals that died and were censored at time t. observed_deaths_col: str, optional (default: "observed") the column in the survival table that represents the number of subjects that were observed to die at a specific time censored_col: str, optional (default: "censored") the column in the survival table that represents the number of subjects that were censored at a specific time Returns ------- T: array durations of observation -- one element for observed time E: array event observations -- 1 if observed, 0 else. W: array weights - integer weights to "condense" the data Example ------- """

    T_ = []
    E_ = []
    W_ = []

    for t, row in survival_table.iterrows():
        if row[observed_deaths_col] > 0:
            T_.append(t)
            E_.append(1)
            W_.append(row[observed_deaths_col])
        if row[censored_col] > 0:
            T_.append(t)
            E_.append(0)
            W_.append(row[censored_col])

    return np.asarray(T_), np.asarray(E_), np.asarray(W_)