human
I wrote the below code

    def _info(vm_):
        state = ''
        dom = _get_domain(vm_)
        raw = dom.info()
        state = VIRT_STATE_NAME_MAP.get(raw[0], 'unknown')
        return state
    info = {}
    if vm_:
        info[vm_] = _info(vm_)
    else:
        for vm_ in list_domains():
            info[vm_] = _info(vm_)
    return info

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def vm_state(vm_=None):