class_docstr: This module produces sinusoidal positional embeddings of any length.
  
  Padding symbols are ignored.
class_docstr_tok: ["This","module","produces","sinusoidal","positional","embeddings","of","any","length",".","Padding","symbols","are","ignored","."]
code: def make_positions(self, tensor, padding_idx, step):
      mask = tensor.ne(padding_idx).int()
      return (
          (torch.cumsum(mask, dim=1).type_as(mask) - 1 + step) * mask
      ).long()
  
imports: import math
  import uuid
  from typing import Dict, Optional, List
  import torch
  from torch import Tensor, nn
  from torch.nn import Parameter, LayerNorm, Dropout
  from lightseq.training.ops.pytorch import util
  from lightseq.training.ops.pytorch.layer_base import TransformerEmbeddingLayerBase, TransformerEncoderLayerBase, TransformerDecoderLayerBase
  from .quantization import QuantLinear, TensorQuantizer, act_quant_config, weight_quant_config, out_quant_config, emb_quant_config
label_desc: Use image node_id 3 for calling the SinusoidalPositionalEmbedding obj's underlying member method code with example usage: obj.make_positions(tensor, padding_idx, step) and returns: unknown