parameters: ()
return_statement: return 1
docstring: Guess at a reasonable parallelism count to set as the default for the
      current machine and run.
docstring_summary: Guess at a reasonable parallelism count to set as the default for the
      current machine and run.
docstring_tokens: Guess at a reasonable parallelism count to set as the default for the current machine and run .
function: def get_cpu_count():
      """
      Guess at a reasonable parallelism count to set as the default for the
      current machine and run.
      """
      # Python 2.6+
      try:
          import multiprocessing
          return multiprocessing.cpu_count()
      except (ImportError,NotImplementedError):
          pass
  
      # POSIX
      try:
          res = int(os.sysconf('SC_NPROCESSORS_ONLN'))
          if res > 0:
              return res
      except (AttributeError,ValueError):
          pass
  
      # Windows
      try:
          res = int(os.environ['NUMBER_OF_PROCESSORS'])
          if res > 0:
              return res
      except (KeyError, ValueError):
          pass
  
      return 1
function_tokens: def get_cpu_count ( ) : # Python 2.6+ try : import multiprocessing return multiprocessing . cpu_count ( ) except ( ImportError , NotImplementedError ) : pass # POSIX try : res = int ( os . sysconf ( 'SC_NPROCESSORS_ONLN' ) ) if res > 0 : return res except ( AttributeError , ValueError ) : pass # Windows try : res = int ( os . environ [ 'NUMBER_OF_PROCESSORS' ] ) if res > 0 : return res except ( KeyError , ValueError ) : pass return 1