code: def _evict(
      self, evictions_per_table: Dict[str, Optional[torch.Tensor]]
  ) -> None:
      for (
          table,
          evictions_indices_for_table,
      ) in evictions_per_table.items():
          if evictions_indices_for_table is not None:
              (tbe, logical_table_ids) = self._table_to_tbe_and_index[
                  table
              ]
              pruned_indices_offsets = torch.tensor(
                  [0, evictions_indices_for_table.shape[0]],
                  dtype=torch.long,
                  device=self._device,
              )
              logger.info(
                  f"Evicting {evictions_indices_for_table.numel()} ids from {table}"
              )
              with torch.no_grad():
                  # embeddings, and optimizer state will be reset
                  tbe.reset_embedding_weight_momentum(
                      pruned_indices=evictions_indices_for_table.long(),
                      pruned_indices_offsets=pruned_indices_offsets,
                      logical_table_ids=logical_table_ids,
                      buffer_ids=self._buffer_ids,
                  )
  
                  if self.bagged:
                      table_weight_param = self._embedding_module.embedding_bags.get_parameter(
                          f"{table}.weight"
                      )
                  else:
                      table_weight_param = self._embedding_module.embeddings.get_parameter(
                          f"{table}.weight"
                      )
  
                  init_fn = (
                      self._embedding_module._table_name_to_config[
                          table
                      ].init_fn
                  )
  
                  # Set evicted indices to original init_fn instead of all zeros
                  # pyre-ignore [29]
                  table_weight_param[
                      evictions_indices_for_table
                  ] = init_fn(
                      table_weight_param[evictions_indices_for_table]
                  )
  
imports: import logging
  from typing import Dict, Iterator, List, Optional, Tuple, Type, TypeVar, Union
  import torch
  from torch.autograd.profiler import record_function
  from torchrec.distributed.embedding import EmbeddingCollectionSharder, ShardedEmbeddingCollection
  from torchrec.distributed.embedding_types import BaseEmbeddingSharder, EmbeddingComputeKernel, KJTList, ShardedEmbeddingModule
  from torchrec.distributed.embeddingbag import EmbeddingBagCollectionSharder, ShardedEmbeddingBagCollection
  from torchrec.distributed.mc_modules import ManagedCollisionCollectionSharder, ShardedManagedCollisionCollection
  from torchrec.distributed.types import Awaitable, LazyAwaitable, Multistreamable, NoWait, ParameterSharding, QuantizedCommCodecs, ShardingEnv
  from torchrec.distributed.utils import append_prefix
  from torchrec.modules.embedding_modules import EmbeddingBagCollection, EmbeddingCollection
  from torchrec.modules.mc_embedding_modules import BaseManagedCollisionEmbeddingCollection, ManagedCollisionEmbeddingBagCollection, ManagedCollisionEmbeddingCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 3 for calling the BaseShardedManagedCollisionEmbeddingCollection obj's underlying member method code with example usage: obj._evict(evictions_per_table) without return types