code: def test_nbeats_forecaster_fit_earlystop(self):
      train_data, val_data, _ = create_data()
      forecaster = NBeatsForecaster(
          past_seq_len=24,
          future_seq_len=5,
          stack_types=("generic", "generic"),
          nb_blocks_per_stack=3,
          hidden_layer_units=256,
          metrics=["mae"],
          lr=0.01,
      )
      val_loss = forecaster.fit(
          (train_data[0], train_data[1]),
          val_data,
          validation_mode="earlystop",
          epochs=10,
      )
  
imports: import os
  import tempfile
  import numpy
  from unittest import TestCase
  import pytest
  from bigdl.chronos.utils import LazyImport
  from ..None import op_torch, op_distributed, op_inference, op_automl
label_desc: Use image node_id 22 for calling the TestChronosNBeatsForecaster obj's underlying member method code with example usage: obj.test_nbeats_forecaster_fit_earlystop() without return types