code: def periodic(inputs: torch.Tensor, period: int) -> torch.Tensor:
      """Returns periodic representation assuming 0 is start of period."""
      return torch.cos(inputs * 2 * math.pi / period)
  
imports: import math
  import os
  import warnings
  from abc import abstractmethod
  from functools import lru_cache
  from typing import List, Optional, Tuple, Union
  import torch
  from torch import nn
  from torch.nn import Module, ModuleDict
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import ENCODER_OUTPUT
  from ludwig.utils.strings_utils import SpecialSymbol
label_desc: Use image node_id 6 for calling a global function with example usage: periodic(inputs, period) and returns: torch