code: def _validate_boolean(value):
      """Validate value is a float."""
      if isinstance(value, str):
          value = value.lower()
      if value not in {True, False, "true", "false"}:
          raise ValueError("Only boolean values are valid.")
      return value is True or value == "true"
  
imports: import locale
  import logging
  import os
  import pprint
  import re
  import sys
  import warnings
  from collections.abc import MutableMapping
  from pathlib import Path
  from typing import Any, Dict
  from typing_extensions import Literal
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: _validate_boolean(value) and returns: unknown