def _get_common_cores(resources):
    """Retrieve the most common configured number of cores in the input file.
    """
    all_cores = []
    for vs in resources.values():
        cores = vs.get("cores")
        if cores:
            all_cores.append(int(vs["cores"]))
    return collections.Counter(all_cores).most_common(1)[0][0]
Retrieve the most common configured number of cores in the input file.