class_docstr: Should be in format {config_name: {**config_params}}.
class_docstr_tok: ["Should","be","in","format","{","config_name",":","{","*","*","config_params","}","}","."]
code: def _from_exported_parquet_files_and_dataset_infos(
      cls,
      revision: str,
      exported_parquet_files: List[Dict[str, Any]],
      dataset_infos: DatasetInfosDict,
  ) -> "MetadataConfigs":
      metadata_configs = {
          config_name: {
              "data_files": [
                  {
                      "split": split_name,
                      "path": [
                          parquet_file["url"].replace(
                              "refs%2Fconvert%2Fparquet", revision
                          )
                          for parquet_file in parquet_files_for_split
                      ],
                  }
                  for split_name, parquet_files_for_split in groupby(
                      parquet_files_for_config, itemgetter("split")
                  )
              ],
              "version": str(
                  dataset_infos.get(config_name, DatasetInfo()).version
                  or "0.0.0"
              ),
          }
          for config_name, parquet_files_for_config in groupby(
              exported_parquet_files, itemgetter("config")
          )
      }
      if dataset_infos:
          # Preserve order of configs and splits
          metadata_configs = {
              config_name: {
                  "data_files": [
                      data_file
                      for split_name in dataset_info.splits
                      for data_file in metadata_configs[config_name][
                          "data_files"
                      ]
                      if data_file["split"] == split_name
                  ],
                  "version": metadata_configs[config_name]["version"],
              }
              for config_name, dataset_info in dataset_infos.items()
          }
      return cls(metadata_configs)
  
imports: import textwrap
  from collections import Counter
  from itertools import groupby
  from operator import itemgetter
  from pathlib import Path
  from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union
  import yaml
  from huggingface_hub import DatasetCardData
  from ..config import METADATA_CONFIGS_FIELD
  from ..info import DatasetInfo, DatasetInfosDict
  from ..utils.logging import get_logger
  from .deprecation_utils import deprecated
label_desc: Use image node_id 2 for calling the MetadataConfigs obj's underlying member method code with example usage: obj._from_exported_parquet_files_and_dataset_infos(cls, revision, exported_parquet_files, dataset_infos) and returns: cls