<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_aids(endpoint="aids"):
 """Load and return the AIDS Clinical Trial dataset The dataset has 1,151 samples and 11 features. The dataset has 2 endpoints: 1. AIDS defining event, which occurred for 96 patients (8.3%) 2. Death, which occurred for 26 patients (2.3%) Parameters endpoint : aids|death The endpoint Returns ------- x : pandas.DataFrame The measurements for each patient. y : structured array with 2 fields *censor*: boolean indicating whether the endpoint has been reached or the event time is right censored. *time*: total length of follow-up If ``endpoint`` is death, the fields are named *censor_d* and *time_d*. References .. [1] http://www.umass.edu/statdata/statdata/data/ .. [2] Hosmer, D., Lemeshow, S., May, S.: "Applied Survival Analysis: Regression Modeling of Time to Event Data." John Wiley & Sons, Inc. (2008) """

    labels_aids = ['censor', 'time']
    labels_death = ['censor_d', 'time_d']
    if endpoint == "aids":
        attr_labels = labels_aids
        drop_columns = labels_death
    elif endpoint == "death":
        attr_labels = labels_death
        drop_columns = labels_aids
    else:
        raise ValueError("endpoint must be 'aids' or 'death'")

    fn = resource_filename(__name__, 'data/actg320.arff')
    x, y = get_x_y(loadarff(fn), attr_labels=attr_labels, pos_label='1')
    x.drop(drop_columns, axis=1, inplace=True)
    return x, y