class_docstr: Main class that supports various functionality for the server.
docstr: Turn the `query` into requests.
docstr_tok: ["Turn","the","`","query","`","into","requests","."]
code: def expand_query(self, query: Query) -> QueryResult:
      """Turn the `query` into requests."""
      prompt = query.prompt
      settings = query.settings
      environments = parse_hocon(query.environments)
      requests = []
      for environment in expand_environments(environments):
          request = synthesize_request(prompt, settings, environment)
          requests.append(request)
      return QueryResult(requests=requests)
  
imports: import os
  import signal
  from typing import List, Optional
  from helm.common.critique_request import CritiqueRequest, CritiqueRequestResult
  from helm.common.authentication import Authentication
  from helm.common.general import ensure_directory_exists, parse_hocon
  from helm.common.perspective_api_request import PerspectiveAPIRequest, PerspectiveAPIRequestResult
  from helm.common.tokenization_request import WindowServiceInfo, TokenizationRequest, TokenizationRequestResult, DecodeRequest, DecodeRequestResult
  from helm.common.request import Request, RequestResult
  from helm.common.hierarchical_logger import hlog
  from helm.proxy.accounts import Accounts, Account
  from helm.proxy.clients.auto_client import AutoClient
  from helm.proxy.clients.perspective_api_client import PerspectiveAPIClient
  from helm.proxy.example_queries import example_queries
  from helm.proxy.models import ALL_MODELS, get_model_group
  from helm.proxy.query import Query, QueryResult
  from helm.proxy.retry import retry_request
  from helm.proxy.token_counters.auto_token_counter import AutoTokenCounter
  from .service import Service, CREDENTIALS_FILE, CACHE_DIR, ACCOUNTS_FILE, GeneralInfo, VERSION, expand_environments, synthesize_request
label_desc: Use image node_id 4 for calling the ServerService obj's underlying member method code with example usage: obj.expand_query(query) and returns: QueryResult