code: def ascertain_cpu_share(max_cores=None):
      
      # Ascertain the number of available CPUs. Jobs will be given fractions of this value.
      num_cores = cpu_count()
      # The minimum number of cpus should be at least 6 if possible
      min_cores = min(num_cores, 6)
      cpu_share = max(num_cores / 2, min_cores)
      if max_cores is not None:
          cpu_share = min(cpu_share, max_cores)
      return cpu_share
docs: Ascertain the number of cpus allowed for each high-compte job instance (bwa, star, rsem, phlat).
  
      :param max_cores: The user-specified max
      :return: The number of cpus allowed for each high-compte job instance
      :rtype: int