code: def prepend_class_token(
      tokens: torch.Tensor, class_token: torch.Tensor
  ) -> torch.Tensor:
      """Prepends class token to tokens.
  
      Args:
          tokens:
              Tokens tensor with shape (batch_size, sequence_length, dim).
          class_token:
              Class token with shape (1, 1, dim).
  
      Returns:
          Tokens tensor with the class token prepended at index 0 in every
          sequence. The tensor has shape (batch_size, sequence_length + 1, dim).
      """
      batch_size = tokens.shape[0]
      batch_class_token = class_token.expand(batch_size, -1, -1)
      return torch.cat([batch_class_token, tokens], dim=1)
  
imports: import math
  import warnings
  from typing import Iterable, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.distributed
  import torch.nn
  from numpy.typing import NDArray
  from torch.nn import Module
  from torch.nn.modules.batchnorm import _BatchNorm
  from torch.nn.parameter import Parameter
label_desc: Use image node_id 16 for calling a global function with example usage: prepend_class_token(tokens, class_token) and returns: torch