code: def create_torch_model(compress_rate, input_dim):
      import torch.nn as nn
  
      autoencoder = nn.Sequential(
          nn.Linear(input_dim, int(compress_rate * input_dim)),
          nn.ReLU(),
          nn.Linear(int(compress_rate * input_dim), input_dim),
          nn.Sigmoid(),
      )
      return autoencoder
  
file_path: BigDL/python/chronos/src/bigdl/chronos/detector/anomaly/ae_detector.py
imports: from bigdl.chronos.detector.anomaly.abstract import AnomalyDetector
  from bigdl.chronos.detector.anomaly.util import roll_arr, scale_arr
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: create_torch_model(compress_rate, input_dim) and returns: autoencoder