code: def seasonality_model(thetas, t):
      p = thetas.size()[-1]
      from bigdl.nano.utils.common import invalidInputError
  
      invalidInputError(p <= thetas.shape[1], "thetas_dim is too big.")
      p1, p2 = (p // 2, p // 2) if p % 2 == 0 else (p // 2, p // 2 + 1)
      s1 = torch.tensor(
          [np.cos(2 * np.pi * i * t) for i in range(p1)]
      ).float()  # H/2-1
      s2 = torch.tensor(
          [np.sin(2 * np.pi * i * t) for i in range(p2)]
      ).float()
      S = torch.cat([s1, s2])
      return thetas.mm(S)
  
imports: import pickle
  import random
  from time import time
  from typing import Union
  import numpy
  import torch
  from torch import nn, optim
  from torch.nn import functional
  from torch.nn.functional import mse_loss, l1_loss, binary_cross_entropy, cross_entropy
  from torch.optim import Optimizer
  from .utils import PYTORCH_REGRESSION_LOSS_MAP
  from pytorch_lightning import seed_everything
label_desc: Use image node_id 1 for calling a global function with example usage: seasonality_model(thetas, t) and returns: thetas