code: def test_query_parser_invalid_group_by(
      bookings_query_parser: MetricFlowQueryParser,
  ) -> None:  # noqa: D
      with pytest.raises(InvalidQueryException):
          bookings_query_parser.parse_and_validate_query(
              group_by_names=["random_stuff"]
          )
  
imports: from __future__ import annotations
  import logging
  import textwrap
  import pytest
  from dbt_semantic_interfaces.parsing.objects import YamlConfigFile
  from dbt_semantic_interfaces.references import EntityReference
  from dbt_semantic_interfaces.test_utils import as_datetime
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.filters.time_constraint import TimeRangeConstraint
  from metricflow.query.query_exceptions import InvalidQueryException
  from metricflow.query.query_parser import MetricFlowQueryParser
  from metricflow.specs.query_param_implementations import DimensionOrEntityParameter, MetricParameter, OrderByParameter, TimeDimensionParameter
  from metricflow.specs.specs import DimensionSpec, EntitySpec, MetricSpec, OrderBySpec, TimeDimensionSpec
  from metricflow.test.fixtures.model_fixtures import query_parser_from_yaml
  from metricflow.test.model.example_project_configuration import EXAMPLE_PROJECT_CONFIGURATION_YAML_CONFIG_FILE
  from metricflow.test.time.metric_time_dimension import MTD
label_desc: Use image node_id 4 for calling a global function with example usage: test_query_parser_invalid_group_by(bookings_query_parser) without return types