code: def query_os_cpu_count() -> int:
      cpu_count = os.cpu_count()
      if cpu_count is not None:
          return cpu_count
      logger.warning(
          "Failed to determine CPU count, using 1 as default."
      )
      return 1
  
imports: from __future__ import annotations
  import functools
  import logging
  import math
  import os
  import re
  import typing
  from abc import ABC
  from abc import abstractmethod
  import psutil
  from ..exceptions import BentoMLConfigException
label_desc: Use image node_id 4 for calling a global function with example usage: query_os_cpu_count() and returns: int, cpu_count