def get_all():
    cmd = 'launchctl list'

    service_lines = [
        line for line in __salt__['cmd.run'](cmd).splitlines()
        if not line.startswith('PID')
    ]

    service_labels_from_list = [
        line.split("\t")[2] for line in service_lines
    ]
    service_labels_from_services = list(_available_services().keys())

    return sorted(set(service_labels_from_list + service_labels_from_services))
Test to ensure that for loops will convert correctly
dataset/ETHPy150Open saltstack/salt/salt/modules/launchctl.py/get_all--crossover with--dataset/ETHPy150Open timothycrosley/jiphy/test_jiphy.py/test_for_loop