code: def _logic_condition(
      condition: Dict[str, Any], document: Document
  ) -> bool:
      if "operator" not in condition:
          msg = f"'operator' key missing in {condition}"
          raise FilterError(msg)
      if "conditions" not in condition:
          msg = f"'conditions' key missing in {condition}"
          raise FilterError(msg)
      operator: str = condition["operator"]
      conditions: List[Dict[str, Any]] = condition["conditions"]
      return LOGICAL_OPERATORS[operator](document, conditions)
  
imports: from typing import List, Any, Union, Dict
  from dataclasses import fields
  from datetime import datetime
  import pandas
  from haystack.dataclasses import Document
  from haystack.errors import FilterError
label_desc: Use image node_id 13 for calling a global function with example usage: _logic_condition(condition, document) and returns: LOGICAL_OPERATORS