Get the values for all counters available to a Counter object

    Args:

        obj (str):
            The name of the counter object. You can get a list of valid names
            using the ``list_objects`` function

        instance_list (list):
            A list of instances to return. Use this to narrow down the counters
            that are returned.

            .. note::
                ``_Total`` is returned as ``*``

def get_all_counters(obj, instance_list=None):
    '''
    Get the values for all counters available to a Counter object

    Args:

        obj (str):
            The name of the counter object. You can get a list of valid names
            using the ``list_objects`` function

        instance_list (list):
            A list of instances to return. Use this to narrow down the counters
            that are returned.

            .. note::
                ``_Total`` is returned as ``*``
    '''
    counters, instances_avail = win32pdh.EnumObjectItems(None, None, obj, -1, 0)

    if instance_list is None:
        instance_list = instances_avail

    if not isinstance(instance_list, list):
        instance_list = [instance_list]

    counter_list = []
    for counter in counters:
        for instance in instance_list:
            instance = '*' if instance.lower() == '_total' else instance
            counter_list.append((obj, instance, counter))
        else:  # pylint: disable=useless-else-on-loop
            counter_list.append((obj, None, counter))

    return get_counters(counter_list) if counter_list else {}