code: def test_validate(
      container_from_file: t.Callable[[str], ConfigDictType]
  ):
      INVALID_CONFIG = """\
  api_server:
    host: localhost
  """
      with pytest.raises(
          BentoMLConfigException,
          match="Invalid configuration file was given:*",
      ):
          container_from_file(INVALID_CONFIG)
  
file_path: BentoML/tests/unit/_internal/configuration/test_v1_migration.py
imports: from __future__ import annotations
  import logging
  import typing
  from typing import TYPE_CHECKING
  import pytest
  from bentoml.exceptions import BentoMLConfigException
label_desc: Use image node_id 3 for calling a global function with example usage: test_validate(container_from_file) without return types