code: def cpu_count(logical=True):
      
      if logical:
          from multiprocessing import cpu_count
          ncpu=cpu_count()
      else:
          import psutil
          ncpu=psutil.cpu_count(logical=False)
      return ncpu
docs: Return system CPU count