def cmd_across_all_procs(hap_objects, method, *arg, **kargs):
    """Return the result of a command executed in all HAProxy process.

    .. note::
        Objects must have a property with the name 'process_nb' which
        returns the HAProxy process number.

    :param hap_objects: a list of objects.
    :type hap_objects: ``list``
    :param method: a valid method for the objects.
    :return: list of 2-item tuple

      #. HAProxy process number
      #. what the method returned

    :rtype: ``list``
    """
    results = []
    for obj in hap_objects:
        results.append((getattr(obj, 'process_nb'), getattr(obj, method)(*
            arg, **kargs)))
    return results
