class_docstr: Adds position weights to id list features.
  
  Args:
      max_feature_lengths (Dict[str, int]): feature name to `max_length` mapping.
          `max_length`, a.k.a truncation size, specifies the maximum number of ids
          each sample has. For each feature, its position weight parameter size is
          `max_length`.
docstr: Args:
      features (Dict[str, JaggedTensor]): dictionary of keys to `JaggedTensor`,
          representing the features.
  
  Returns:
      Dict[str, JaggedTensor]: same as input features with `weights` field being populated.
docstr_tok: ["Args",":","features","(","Dict","[","str",",","JaggedTensor","]",")",":","dictionary","of","keys","to","`","JaggedTensor","`",",","representing","the","features",".","Returns",":","Dict","[","str",",","JaggedTensor","]",":","same","as","input","features","with","`","weights","`","field","being","populated","."]
code: def forward(
      self,
      features: Dict[str, JaggedTensor],
  ) -> Dict[str, JaggedTensor]:
      """
      Args:
          features (Dict[str, JaggedTensor]): dictionary of keys to `JaggedTensor`,
              representing the features.
  
      Returns:
          Dict[str, JaggedTensor]: same as input features with `weights` field being populated.
      """
  
      weighted_features: Dict[str, JaggedTensor] = {}
      for key, position_weight in self.position_weights.items():
          seq = torch.ops.fbgemm.offsets_range(
              features[key].offsets().long(),
              torch.numel(features[key].values()),
          )
          weighted_features[key] = JaggedTensor(
              values=features[key].values(),
              lengths=features[key].lengths(),
              offsets=features[key].offsets(),
              weights=torch.gather(position_weight, dim=0, index=seq),
          )
      return position_weighted_module_update_features(
          features, weighted_features
      )
  
imports: import abc
  from collections import OrderedDict
  from typing import Any, Dict, Iterator, List, Optional, Tuple
  import torch
  import torch.nn
  from torchrec.fx.tracer import is_fx_tracing
  from torchrec.sparse.jagged_tensor import JaggedTensor, KeyedJaggedTensor
label_desc: Use image node_id 3 for calling the PositionWeightedModule obj's underlying member method code with example usage: obj.forward(features) and returns: position_weighted_module_update_features