class_docstr: EmbeddingBagCollection represents a collection of pooled embeddings (`EmbeddingBags`).
  
  It processes sparse data in the form of `KeyedJaggedTensor` with values of the form
  [F X B X L] where:
  
  * F: features (keys)
  * B: batch size
  * L: length of sparse features (jagged)
  
  and outputs a `KeyedTensor` with values of the form [B * (F * D)] where:
  
  * F: features (keys)
  * D: each feature's (key's) embedding dimension
  * B: batch size
  
  Args:
      tables (List[EmbeddingBagConfig]): list of embedding tables.
      is_weighted (bool): whether input `KeyedJaggedTensor` is weighted.
      device (Optional[torch.device]): default compute device.
  
  Example::
  
      table_0 = EmbeddingBagConfig(
          name="t1", embedding_dim=3, num_embeddings=10, feature_names=["f1"]
      )
      table_1 = EmbeddingBagConfig(
          name="t2", embedding_dim=4, num_embeddings=10, feature_names=["f2"]
      )
  
      ebc = EmbeddingBagCollection(tables=[table_0, table_1])
  
      #        0       1        2  <-- batch
      # "f1"   [0,1] None    [2]
      # "f2"   [3]    [4]    [5,6,7]
      #  ^
      # feature
  
      features = KeyedJaggedTensor(
          keys=["f1", "f2"],
          values=torch.tensor([0, 1, 2, 3, 4, 5, 6, 7]),
          offsets=torch.tensor([0, 2, 2, 3, 4, 5, 8]),
      )
  
      pooled_embeddings = ebc(features)
      print(pooled_embeddings.values())
      tensor([[-0.8899, -0.1342, -1.9060, -0.0905, -0.2814, -0.9369, -0.7783],
          [ 0.0000,  0.0000,  0.0000,  0.1598,  0.0695,  1.3265, -0.1011],
          [-0.4256, -1.1846, -2.1648, -1.0893,  0.3590, -1.9784, -0.7681]],
          grad_fn=<CatBackward0>)
      print(pooled_embeddings.keys())
      ['f1', 'f2']
      print(pooled_embeddings.offset_per_key())
      tensor([0, 3, 7])
code: def device(self) -> torch.device:
      return self._device
  
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 5 for calling the EmbeddingBagCollection obj's underlying member method code with example usage: obj.device() and returns: self