code: def test_timestep_downscale_freq_shift(self):
      embedding_dim = 16
      timesteps = torch.arange(10)
  
      t1 = get_timestep_embedding(
          timesteps, embedding_dim, downscale_freq_shift=0
      )
      t2 = get_timestep_embedding(
          timesteps, embedding_dim, downscale_freq_shift=1
      )
  
      # get cosine half (vectors that are wrapped into cosine)
      cosine_half = (t1 - t2)[:, embedding_dim // 2 :]
  
      # cosine needs to be negative
      assert (np.abs((cosine_half <= 0).numpy()) - 1).sum() < 1e-5
  
imports: import unittest
  import numpy
  import torch
  from torch import nn
  from diffusers.models.attention import GEGLU, AdaLayerNorm, ApproximateGELU
  from diffusers.models.embeddings import get_timestep_embedding
  from diffusers.models.lora import LoRACompatibleLinear
  from diffusers.models.resnet import Downsample2D, ResnetBlock2D, Upsample2D
  from diffusers.models.transformer_2d import Transformer2DModel
  from diffusers.utils.testing_utils import torch_device
label_desc: Use image node_id 4 for calling the EmbeddingsTests obj's underlying member method code with example usage: obj.test_timestep_downscale_freq_shift() without return types