def perform_regression(regression, test_size):
    """
    This function receives regression model and test_size as parameters and then goes through the steps of performing
    the supplied regression
    :param regression: regression model
    :param test_size: splitting data test size. (optional)
    :return: regression metrics
    """

    regression.import_dataset().split_dataset(test_size=test_size).train_model()
    regression.predict_test()
    metrics = regression.evaluate_metrics(regression.__str__())
    return metrics