Validates the structure and contents of the query based on the v2.0 model. This function checks that the query is a list and contains all required keys.
validate_query(query)
Invisibly returns TRUE if validation passes. Throws an error If the query structure is invalid or missing required keys.
# Create a valid query
query <- get_valid_query()
validate_query(query) # Passes validation
# Example with invalid query (missing required key)
if (FALSE) { # \dontrun{
invalid_query <- list(inputs = list(), mode = "mean estimation")
validate_query(invalid_query) # Throws error for missing modality
} # }