input: Write a function to construct a neural network in Python that can perform basic regression. The function should load the data from a CSV file, split the data into features and labels, create a neural network model using Keras, compile and train the model, and finally evaluate the model on the test data. If the dataset is missing or invalid, the function should return a message indicating the error.
  assert construct_neural_network('valid_data.csv') == 'Test score: 0.12345'
  assert construct_neural_network('invalid_data.csv') == 'Error: Dataset is missing or invalid.'
  assert construct_neural_network('empty_data.csv') == 'Error: Dataset is missing or invalid.'
output: def construct_neural_network(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.preprocessing import StandardScaler
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense
      import numpy as np
      
      try:
          data = pd.read_csv(file_path)
          if data.empty:
              return 'Error: Dataset is missing or invalid.'
          
          X = data.iloc[:, :-1].values
          y = data.iloc[:, -1].values
          
          X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
          
          scaler = StandardScaler()
          X_train = scaler.fit_transform(X_train)
          X_test = scaler.transform(X_test)
          
          model = Sequential()
          model.add(Dense(10, input_dim=X_train.shape[1], activation='relu'))
          model.add(Dense(1))
          
          model.compile(optimizer='adam', loss='mean_squared_error')
          model.fit(X_train, y_train, epochs=10, batch_size=10, verbose=0)
          
          test_loss = model.evaluate(X_test, y_test, verbose=0)
          return f'Test score: {test_loss:.5f}'
      
      except Exception:
          return 'Error: Dataset is missing or invalid.'