code: def model_creator(config):
      if config.get("num_channels") and (
          config.get("nhid") and config.get("levels")
      ):
          warnings.warn(
              f"WARNING: You set both num_channels and (nhid, levels) for TCN. "
              f"Only num_channels={config['num_channels']} will be effective."
          )
      if config.get("num_channels"):
          num_channels = config["num_channels"]
      else:
          n_hid = config["nhid"] if config.get("nhid") else 30
          levels = config["levels"] if config.get("levels") else 8
          num_channels = [n_hid] * (levels - 1)
      return TemporalConvNet(
          past_seq_len=config["past_seq_len"],
          input_feature_num=config["input_feature_num"],
          future_seq_len=config["future_seq_len"],
          output_feature_num=config["output_feature_num"],
          num_channels=num_channels.copy(),
          kernel_size=config.get("kernel_size", 7),
          dropout=config.get("dropout", 0.2),
          repo_initialization=config.get("repo_initialization", True),
      )
  
imports: import warnings
  import torch
  import torch.nn
  from torch.nn.utils import weight_norm
  from zoo.orca.automl.model.base_pytorch_model import PytorchBaseModel, PYTORCH_REGRESSION_LOSS_MAP
label_desc: Use image node_id 1 for calling a global function with example usage: model_creator(config) and returns: TemporalConvNet