code: def get_num_bytes_from_config_infos(
      dataset: str, config: str, split: Optional[str] = None
  ) -> Optional[int]:
      resp = get_best_response(
          kinds=CONFIG_INFO_KINDS, dataset=dataset, config=config
      ).response
      if "dataset_info" in resp["content"] and isinstance(
          resp["content"]["dataset_info"], dict
      ):
          dataset_info = resp["content"]["dataset_info"]
          if split is None:
              num_bytes = dataset_info.get("dataset_size")
              if isinstance(num_bytes, int):
                  return num_bytes
          elif "splits" in dataset_info and isinstance(
              dataset_info["splits"], dict
          ):
              split_infos = dataset_info["splits"]
              if split in split_infos and isinstance(
                  split_infos[split], dict
              ):
                  split_info = split_infos[split]
                  num_bytes = split_info.get("num_bytes")
                  if isinstance(num_bytes, int):
                      return num_bytes
      return None
  
imports: import logging
  from abc import ABC, abstractmethod
  from dataclasses import dataclass, field
  from http import HTTPStatus
  from typing import Optional, Union
  import pandas
  from libcommon.constants import CONFIG_INFO_KINDS, CONFIG_SPLIT_NAMES_KINDS, DATASET_CONFIG_NAMES_KINDS, DEFAULT_DIFFICULTY_MAX, DIFFICULTY_BONUS_BY_FAILED_RUNS
  from libcommon.processing_graph import ProcessingGraph, ProcessingStep, ProcessingStepDoesNotExist, processing_graph
  from libcommon.prometheus import StepProfiler
  from libcommon.queue import Queue
  from libcommon.simple_cache import CacheEntryDoesNotExistError, delete_dataset_responses, fetch_names, get_best_response, get_cache_entries_df, get_response_metadata, upsert_response_params
  from libcommon.state import ArtifactState, DatasetState, FirstStepsDatasetState
  from libcommon.storage_client import StorageClient
  from libcommon.utils import JobInfo, JobResult, Priority
label_desc: Use image node_id 1 for calling a global function with example usage: get_num_bytes_from_config_infos(dataset, config, split) and returns: None, num_bytes, num_bytes