<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def model(X_train, Y_train, X_test, Y_test, num_iterations=2000, learning_rate=0.5, print_cost=True):
 """ Builds the logistic regression model by calling the function implemented above Arguments: X_train training set represented by a numpy array of shape (dim, m_train) Y_train training labels represented by a numpy array (vector) of shape (1, m_train) X_test test set represented by a numpy array of shape (dim, m_test) Y_test test labels represented by a numpy array (vector) of shape (1, m_test) num_iterations hyperparameter representing the number of iterations to optimize the parameters learning_rate hyperparameter representing the learning rate used in the update rule of optimize() print_cost Set to true to print the cost every 100 iterations Returns: d -- dictionary containing information about the model. """

    print('X_train shape:', X_train.shape)

    # initialize parameters with zeros
    w, b = initialize_with_zeros(X_train.shape[0])

    print('w shape:', w.shape)
    # Gradient descent
    parameters, grads, costs = LR_train(w, b, X_train, Y_train, num_iterations,
                                        learning_rate, print_cost)

    # Retrieve parameters w and b from dictionary "parameters"
    w = parameters["w"]
    b = parameters["b"]

    print('w shape params:', w.shape)

    Y_prediction_test = LR_predict(w, b, X_test)
    Y_prediction_train = LR_predict(w, b, X_train)

    # Print train/test Errors
    print("train accuracy: {} %".format(100 - np.mean(np.abs(Y_prediction_train - Y_train)) * 100))
    print("test accuracy: {} %".format(100 - np.mean(np.abs(Y_prediction_test - Y_test)) * 100))

    d = {"costs": costs,
         "Y_prediction_test": Y_prediction_test,
         "Y_prediction_train": Y_prediction_train,
         "w": w,
         "b": b,
         "learning_rate": learning_rate,
         "num_iterations": num_iterations}

    return d