def validate_num_cpus(num_cpus):
    """
    Validate `num_cpus` on correctness.

    Each value of `num_cpus` is checked on possibility
    of converting to int.

    Parameters
    ----------
    num_cpus : list or str
        List of string values. Each value represents
        number of CPUs to be used by corresponding host.

    Returns
    -------
    list
        List of validated number of CPUs per host.
    """
    if not isinstance(num_cpus, list):
        num_cpus = [num_cpus]

    def validate(value):
        try:
            value = int(value)
            if value < 1:
                raise RuntimeError(f"'num_cpus' must be more than 0, got '{num_cpus}'")
        except ValueError:
            raise TypeError(
                f"'num_cpus' must be integer or sequence of integers, got '{num_cpus}'"
            )
        else:
            return value

    return [str(validate(n)) for n in num_cpus]