code: def from_system(cls) -> float:
      if psutil.POSIX:
          return query_cgroup_cpu_count()
      else:
          return float(query_os_cpu_count())
  
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 2 for calling the CpuResource obj's underlying member method code with example usage: obj.from_system(cls) and returns: query_cgroup_cpu_count, float