code: def _cpu_count_impl(logical: bool = True) -> int:
      """Return the number of logical or physical CPUs in the system
  
      Parameters
      ----------
      logical : bool = True
          If True, return the number of logical CPUs, otherwise return the number of physical CPUs
  
      Returns
      -------
      cpu_count : int
          The number of logical or physical CPUs in the system
  
      Note
      ----
      The meta schedule search infra intentionally does not adopt the following convention in TVM:
      - C++ API `tvm::runtime::threading::MaxConcurrency()`
      - Environment variable `TVM_NUM_THREADS` or
      - Environment variable `OMP_NUM_THREADS`
      This is because these variables are dedicated to controlling
      the runtime behavior of generated kernels, instead of the host-side search.
      Setting these variables may interfere the host-side search with profiling of generated kernels
      when measuring locally.
      """
      return psutil.cpu_count(logical=logical) or 1
  
imports: import ctypes
  import os
  import shutil
  from typing import Any, Callable, List, Optional, Union
  import numpy
  import psutil
  from tvm._ffi import get_global_func, register_func
  from tvm.error import TVMError
  from tvm.ir import Array, IRModule, Map
  from tvm.rpc import RPCSession
  from tvm.runtime import PackedFunc, String
  from tvm.tir import FloatImm, IntImm
label_desc: Use image node_id 2 for calling a global function with example usage: _cpu_count_impl(logical) and returns: unknown