code: def get_api_client_configuration(
      token: Optional[str] = None,
      raise_if_no_token_specified: bool = True,
  ) -> Configuration:
      host = get_lightly_server_location_from_env()
      ssl_ca_cert = getenv("LIGHTLY_CA_CERTS", None)
  
      if token is None:
          token = getenv("LIGHTLY_TOKEN", None)
      if token is None and raise_if_no_token_specified:
          raise ValueError(
              "Either provide a 'token' argument or export a LIGHTLY_TOKEN environment variable"
          )
  
      configuration = Configuration()
      configuration.api_key = {"ApiKeyAuth": token}
      configuration.ssl_ca_cert = ssl_ca_cert
      configuration.host = host
  
      return configuration
  
imports: import io
  import os
  import random
  import threading
  import time
  from enum import Enum
  from typing import Iterator, List, Optional
  from PIL import JpegImagePlugin
  from lightly.openapi_generated.swagger_client.configuration import Configuration
label_desc: Use image node_id 9 for calling a global function with example usage: get_api_client_configuration(token, raise_if_no_token_specified) and returns: configuration