code: def test_compile_fit(self):
      model = AnomalyDetector(
          feature_shape=(5, 3), hidden_layers=[8], dropouts=[0.2]
      )
      input_data = [
          [float(i), float(i + 1), float(i + 2)] for i in range(20)
      ]
      rdd = self.sc.parallelize(input_data)
      unrolled = AnomalyDetector.unroll(rdd, 5, 1)
      [train, validation] = AnomalyDetector.train_test_split(
          unrolled, 10
      )
      model.compile(loss="mse", optimizer="rmsprop", metrics=["mae"])
      model.fit(
          train, batch_size=4, nb_epoch=1, validation_data=validation
      )
  
file_path: analytics-zoo/pyzoo/test/zoo/models/anomalydetection/test_anomalydetector.py
imports: import pytest
  import numpy
  from zoo.models.anomalydetection import AnomalyDetector
  from test.zoo.pipeline.utils.test_utils import ZooTestCase
label_desc: Use image node_id 3 for calling the TestAnomalyDetector obj's underlying member method code with example usage: obj.test_compile_fit() without return types