def METHOD_NAME(
    cpus_per_process: float = 2, memory_per_process: float = 16
) -> int:
    """
    Returns the number of processes that can be fitted onto the machine when
    using a particular number of CPUs and a particular amount of memory for
    every process.
    Args:
        cpus_per_process: The number of CPUs that every process requires.
        memory_per_process: The memory in GiB that every process needs.
    Returns:
        The number of processes to use.
    """
    num_processes_cpu = math.floor(
        cast(int, os.cpu_count()) / cpus_per_process
    )
    available_gib = psutil.virtual_memory().total / (1024**3)
    num_processes_memory = math.floor(available_gib / memory_per_process)
    return min(num_processes_cpu, num_processes_memory)