code: def process_pooled_embeddings(
      pooled_embeddings: List[torch.Tensor],
      inverse_indices: torch.Tensor,
  ) -> torch.Tensor:
      if inverse_indices.numel() > 0:
          pooled_embeddings = torch.ops.fbgemm.group_index_select_dim0(
              pooled_embeddings, list(torch.unbind(inverse_indices))
          )
      return torch.cat(pooled_embeddings, dim=1)
  
imports: import abc
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from torchrec.modules.embedding_configs import DataType, EmbeddingBagConfig, EmbeddingConfig, pooling_type_to_str
  from torchrec.sparse.jagged_tensor import JaggedTensor, KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 2 for calling a global function with example usage: process_pooled_embeddings(pooled_embeddings, inverse_indices) and returns: torch