class_docstr: Main class that supports various functionality for the server.
code: def __init__(
      self, base_path: str = ".", root_mode=False, mongo_uri: str = ""
  ):
      credentials_path = os.path.join(base_path, CREDENTIALS_FILE)
      cache_path = os.path.join(base_path, CACHE_DIR)
      ensure_directory_exists(cache_path)
      accounts_path = os.path.join(base_path, ACCOUNTS_FILE)
  
      if os.path.exists(credentials_path):
          with open(credentials_path) as f:
              credentials = parse_hocon(f.read())
      else:
          credentials = {}
  
      self.client = AutoClient(credentials, cache_path, mongo_uri)
      self.token_counter = AutoTokenCounter(
          self.client.huggingface_client
      )
      self.accounts = Accounts(accounts_path, root_mode=root_mode)
      # Lazily instantiated by get_toxicity_scores()
      self.perspective_api_client: Optional[PerspectiveAPIClient] = None
  
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 1 to create a new ServerService object from inherited base classes: Service with example: obj = ServerService(base_path, root_mode, mongo_uri)