input: Write a python function to train a linear regression model using a dataset and return the predicted values for the test set.
  assert len(train_and_predict('<dataset_path>')) == len(pd.read_csv('<dataset_path>').iloc[:, -1]) * 0.2
  assert isinstance(train_and_predict('<dataset_path>')[0], np.float64)
output: def train_and_predict(dataset_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.linear_model import LinearRegression
      import numpy as np
  
      # Load the dataset
      df = pd.read_csv(dataset_path)
  
      # Separate the features (X) and the target (y)
      X = df.iloc[:, :-1].values
      y = df.iloc[:, -1].values
  
      # Split the data into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
      # Create and train the linear regression model
      model = LinearRegression()
      model.fit(X_train, y_train)
  
      # Predict the values for the test set
      predictions = model.predict(X_test)
  
      return predictions