code: def test_lstm_customized_loss_metric(self):
      from torchmetrics.functional import mean_squared_error
  
      train_data, _, _ = create_data(loader=True)
      _, _, test_data = create_data()
      loss = torch.nn.L1Loss()
  
      def customized_metric(y_true, y_pred):
          return mean_squared_error(
              torch.from_numpy(y_pred), torch.from_numpy(y_true)
          ).numpy()
  
      forecaster = LSTMForecaster(
          past_seq_len=24,
          input_feature_num=2,
          output_feature_num=2,
          loss=loss,
          metrics=[customized_metric],
          lr=0.01,
      )
      forecaster.fit(train_data, epochs=2)
      with tempfile.TemporaryDirectory() as tmp_dir_name:
          ckpt_name = os.path.join(tmp_dir_name, "ckpt")
          test_pred_save = forecaster.predict(
              test_data[0], acceleration=False
          )
          forecaster.save(ckpt_name)
          forecaster.load(ckpt_name)
          test_pred_load = forecaster.predict(
              test_data[0], acceleration=False
          )
      np.testing.assert_almost_equal(test_pred_save, test_pred_load)
  
imports: import numpy
  import tempfile
  import os
  from bigdl.chronos.utils import LazyImport
  from unittest import TestCase
  import pytest
  from ..None import op_torch, op_distributed, op_inference, op_automl
label_desc: Use image node_id 19 for calling the TestChronosModelLSTMForecaster obj's underlying member method code with example usage: obj.test_lstm_customized_loss_metric() and returns: mean_squared_error