code: def query_options(function: Callable) -> Callable:
      """Common options for a query."""
      function = click.option(
          "--order",
          type=click_custom.SequenceParamType(),
          help='Metrics or group bys to order by ("-" prefix for DESC). For example: --order -ds or --order ds,-revenue',
          required=False,
      )(function)
      function = click.option(
          "--limit",
          type=str,
          help="Limit the number of rows out using an int or leave blank for no limit. For example: --limit 100",
          callback=lambda ctx, param, value: validate_limit(value),
      )(function)
      function = click.option(
          "--where",
          type=str,
          default=None,
          help='SQL-like where statement provided as a string. For example: --where "revenue > 100"',
      )(function)
      function = start_end_time_options(function)
      function = click.option(
          "--group-by",
          type=click_custom.SequenceParamType(),
          default="",
          help="Dimensions and/or entities to group by: syntax is --group-by ds or for multiple group bys --group-by ds,org",
      )(function)
      function = click.option(
          "--metrics",
          type=click_custom.SequenceParamType(min_length=0),
          default="",
          help="Metrics to query for: syntax is --metrics bookings or for multiple metrics --metrics bookings,messages",
      )(function)
      return function
  
file_path: metricflow/metricflow/cli/utils.py
imports: from __future__ import annotations
  import datetime
  import logging
  import pathlib
  import traceback
  from functools import update_wrapper, wraps
  from typing import Any, Callable, List, Optional
  import click
  from dateutil.parser import parse
  import metricflow.cli.custom_click_types
  from metricflow.cli.cli_context import CLIContext
label_desc: Use image node_id 1 for calling a global function with example usage: query_options(function) and returns: function