code: def _validate_config_args(
      config: Optional[Dict[str, Union[str, int, float, bytes]]]
  ) -> None:
      """Validator for the configuration.
  
      Parameters
      ----------
      config
          configuration arguments passed into ``__init__`` of
          ``ModelComponent``
  
      Raises
      ------
      TypeError
          If ``config`` is not a dict.
      TypeError
          If ``config`` is a dict with invalid key/values
      ValueError
          If ``config`` is a dict with 0 arguments
  
      """
      if config is None:
          return
  
      if not isinstance(config, dict):
          raise TypeError(
              f"Config must be {dict}. Recieved config={config}"
          )
  
      if len(config) == 0:
          raise ValueError("cannot set dict of length < 1 for `config`")
  
      for k, v in config.items():
          if not isinstance(k, str):
              raise TypeError(f"config key={k} != {str} type")
          if not isinstance(v, (str, bytes, int, float)):
              raise TypeError(
                  f"config val k={k}, v={v} != {(str, bytes, int, float)} type"
              )
  
file_path: lightning-flash/src/flash/core/serve/component.py
imports: import inspect
  from dataclasses import replace
  from functools import wraps
  from typing import Dict, List, Optional, Tuple, Type, Union
  from torch import nn
  from flash.core.serve.core import ParameterContainer, Servable
  from flash.core.serve.decorators import BoundMeta, UnboundMeta
  from flash.core.utilities.imports import _CYTOOLZ_AVAILABLE, _TOPIC_SERVE_AVAILABLE, requires
label_desc: Use image node_id 4 for calling a global function with example usage: _validate_config_args(config) without return types