code: def forward(self, idx: torch.Tensor) -> torch.Tensor:
      b, t = idx.size()
      assert (
          t <= self.block_size
      ), f"Cannot forward sequence of length {t}, block size is only {self.block_size}"
  
      token_embeddings = self.tok_emb(
          idx
      )  # each index maps to a (learnable) embedding vector
      position_embeddings = self.pos_emb[
          :, :t, :
      ]  # each position maps to a (learnable) position vector
      return self.drop(token_embeddings + position_embeddings)
  
imports: import math
  from dataclasses import dataclass
  from typing import Optional, Tuple
  import torch
  import torch.nn
  from torch.nn import functional
label_desc: Use image node_id 3 for calling the EmbeddingStem obj's underlying member method code with example usage: obj.forward(idx) and returns: self