code: def get_query_object(
      query_name: str,
      add_postprocessing_operations: bool,
      add_time_offsets: bool,
  ) -> dict[str, Any]:
      if query_name not in QUERY_OBJECTS:
          raise Exception(
              f"QueryObject fixture not defined for datasource: {query_name}"
          )
      obj = QUERY_OBJECTS[query_name]
  
      # apply overrides
      if ":" in query_name:
          parent_query_name = query_name.split(":")[0]
          obj = {
              **QUERY_OBJECTS[parent_query_name],
              **obj,
          }
  
      query_object = copy.deepcopy(obj)
      if add_postprocessing_operations:
          query_object[
              "post_processing"
          ] = _get_postprocessing_operation(query_name)
      if add_time_offsets:
          query_object["time_offsets"] = ["1 year ago"]
  
      return query_object
  
file_path: superset/tests/common/query_context_generator.py
imports: import copy
  import dataclasses
  from typing import Any, Optional
  from superset.common.chart_data import ChartDataResultType
  from superset.utils.core import AnnotationType, DTTM_ALIAS
label_desc: Use image node_id 1 for calling a global function with example usage: get_query_object(query_name, add_postprocessing_operations, add_time_offsets) and returns: query_object