code: def is_turbo_boost_enabled():
      
      try:
          if os.path.exists(_TURBO_BOOST_FILE):
              boost_enabled = int(util.read_file(_TURBO_BOOST_FILE))
              if not (0 <= boost_enabled <= 1):
                  raise ValueError('Invalid value {} for turbo boost activation'.format(boost_enabled))
              return boost_enabled != 0
          if os.path.exists(_TURBO_BOOST_FILE_PSTATE):
              boost_disabled = int(util.read_file(_TURBO_BOOST_FILE_PSTATE))
              if not (0 <= boost_disabled <= 1):
                  raise ValueError('Invalid value {} for turbo boost activation'.format(boost_enabled))
              return boost_disabled != 1
      except ValueError as e:
          sys.exit("Could not read turbo-boost information from kernel: {0}".format(e))
docs: Check whether Turbo Boost (scaling CPU frequency beyond nominal frequency)
      is active on this system.
      @return: A bool, or None if Turbo Boost is not supported.