code: def model_creator(config):
      hidden_dim = config.get("hidden_dim", 32)
      dropout = config.get("dropout", 0.2)
      layer_num = config.get("layer_num", 2)
      if isinstance(hidden_dim, list):
          assert (
              len(hidden_dim) == layer_num
          ), "length of hidden_dim should be equal to layer_num"
      if isinstance(dropout, list):
          assert (
              len(dropout) == layer_num
          ), "length of dropout should be equal to layer_num"
      if isinstance(hidden_dim, int):
          hidden_dim = [hidden_dim] * layer_num
      if isinstance(dropout, (float, int)):
          dropout = [dropout] * layer_num
      return LSTMModel(
          input_dim=config["input_feature_num"],
          hidden_dim=hidden_dim,
          layer_num=layer_num,
          dropout=dropout,
          output_dim=config["output_feature_num"],
      )
  
file_path: analytics-zoo/pyzoo/zoo/chronos/model/VanillaLSTM_pytorch.py
imports: import torch
  import torch.nn
  from zoo.orca.automl.model.base_pytorch_model import PytorchBaseModel
label_desc: Use image node_id 1 for calling a global function with example usage: model_creator(config) and returns: LSTMModel