def is_weekend(data):
    """
    Adds a binary is_weekend column to a pandas DataFrame 
    
    Args:
        data - a pandas DataFrame containing a 'created_time' column of
               datetime objects
    Returns:
        A DataFrame with an additional 'is_weekend' column
        if data['created_time'][i] is Friday, Saturday or Sunday then
        data['is_weekend'][i] = 1
    """
    data['is_weekend'] = 0
    weekend_days = {4, 5, 6}
    for idx in data.index:
        wd = data.created_time[idx].weekday()
        if wd in weekend_days:
            data['is_weekend'][idx] = 1
    return data