code: def test_check_prompt_requirements():
      config = {
          "model_type": "llm",
          "input_features": [
              text_feature(
                  name="input1",
                  column="col1",
                  encoder={"type": "passthrough"},
              ),
          ],
          "output_features": [text_feature(name="output1")],
          "base_model": "opt-350m",
      }
  
      ModelConfig.from_dict(config)
  
      config["prompt"] = {"task": "Some task"}
      ModelConfig.from_dict(config)
  
      config["prompt"] = {
          "task": "Some task",
          "template": "Some template not mentioning the task",
      }
      with pytest.raises(ConfigValidationError):
          ModelConfig.from_dict(config)
  
      config["prompt"] = {
          "task": "Some task",
          "template": "{__invalid__}",
      }
      with pytest.raises(ConfigValidationError):
          ModelConfig.from_dict(config)
  
      config["prompt"] = {"task": "Some task", "template": "{__task__}"}
      ModelConfig.from_dict(config)
  
      config["prompt"] = {"template": "{input1}"}
      ModelConfig.from_dict(config)
  
      # Raise an error if template has a placeholder for the output feature.
      config["prompt"] = {"template": "{input1}: {output1}"}
      with pytest.raises(ConfigValidationError):
          ModelConfig.from_dict(config)
  
imports: import contextlib
  from typing import Any, Dict, List, Optional
  import pytest
  import yaml
  from ludwig.constants import COMBINER, TYPE
  from ludwig.error import ConfigValidationError
  from ludwig.schema.model_types.base import ModelConfig
  from tests.integration_tests.utils import binary_feature, text_feature
label_desc: Use image node_id 18 for calling a global function with example usage: test_check_prompt_requirements() without return types