code: def from_float(
      cls, module: OriginalFeatureProcessedEmbeddingBagCollection
  ) -> "FeatureProcessedEmbeddingBagCollection":
      fp_ebc = module
      ebc = module._embedding_bag_collection
      qconfig = module.qconfig
      assert hasattr(
          module, "qconfig"
      ), "FeatureProcessedEmbeddingBagCollection input float module must have qconfig defined"
  
      embedding_bag_configs = copy.deepcopy(ebc.embedding_bag_configs())
      _update_embedding_configs(
          cast(List[BaseEmbeddingConfig], embedding_bag_configs),
          qconfig,
      )
      pruning_dict: Dict[str, torch.Tensor] = getattr(
          module,
          MODULE_ATTR_EMB_CONFIG_NAME_TO_PRUNING_INDICES_REMAPPING_DICT,
          {},
      )
  
      for config in embedding_bag_configs:
          if config.name in pruning_dict:
              pruning_indices_remapping = pruning_dict[config.name]
              config.num_embeddings = pruned_num_embeddings(
                  pruning_indices_remapping
              )
              config.pruning_indices_remapping = (
                  pruning_indices_remapping
              )
  
      table_name_to_quantized_weights: Dict[
          str, Tuple[Tensor, Tensor]
      ] = {}
      device = quantize_state_dict(
          ebc,
          table_name_to_quantized_weights,
          {
              table.name: table.data_type
              for table in embedding_bag_configs
          },
          pruning_dict,
      )
      return cls(
          embedding_bag_configs,
          ebc.is_weighted(),
          device=device,
          output_dtype=qconfig.activation().dtype,
          table_name_to_quantized_weights=table_name_to_quantized_weights,
          register_tbes=getattr(
              module, MODULE_ATTR_REGISTER_TBES_BOOL, False
          ),
          quant_state_dict_split_scale_bias=getattr(
              ebc, MODULE_ATTR_QUANT_STATE_DICT_SPLIT_SCALE_BIAS, False
          ),
          row_alignment=getattr(
              ebc, MODULE_ATTR_ROW_ALIGNMENT_INT, DEFAULT_ROW_ALIGNMENT
          ),
          # pyre-ignore
          feature_processor=fp_ebc._feature_processors,
      )
  
imports: import copy
  import itertools
  from collections import defaultdict
  from typing import Callable, cast, Dict, List, Optional, Tuple, Type, Union
  import torch
  import torch.nn
  from fbgemm_gpu.split_table_batched_embeddings_ops_inference import EmbeddingLocation, IntNBitTableBatchedEmbeddingBagsCodegen, PoolingMode
  from torch import Tensor
  from torchrec.distributed.utils import none_throws
  from torchrec.modules.embedding_configs import BaseEmbeddingConfig, DATA_TYPE_NUM_BITS, data_type_to_sparse_type, DataType, dtype_to_data_type, EmbeddingBagConfig, EmbeddingConfig, pooling_type_to_pooling_mode, PoolingType, QuantConfig
  from torchrec.modules.embedding_modules import EmbeddingBagCollection, EmbeddingBagCollectionInterface, EmbeddingCollection, EmbeddingCollectionInterface, get_embedding_names_by_table
  from torchrec.modules.feature_processor_ import FeatureProcessorsCollection
  from torchrec.modules.fp_embedding_modules import FeatureProcessedEmbeddingBagCollection
  from torchrec.sparse.jagged_tensor import JaggedTensor, KeyedJaggedTensor, KeyedTensor
  from torchrec.tensor_types import UInt2Tensor, UInt4Tensor
  from torchrec.types import ModuleNoCopyMixin
label_desc: Use image node_id 4 for calling the FeatureProcessedEmbeddingBagCollection obj's underlying member method code with example usage: obj.from_float(cls, module) and returns: cls