human
I wrote the below code

    null_target = {'target': None, 'tgt_type': None}
    def check_cmd_against_group(cmd):
        'Validate    cmd    against    the    group    to    return    the    target,    or    a    null    target'
        (name, group_config) = permitted_group
        target = group_config.get('default_target')
        if (not target):
            target = null_target
        if group_config.get('targets'):
            if group_config['targets'].get(cmd):
                target = group_config['targets'][cmd]
        if (not target.get('target')):
            log.debug('Group    {}    is    not    configured    to    have    a    target    for    cmd    {}.'.format(name, cmd))
        return target
    for this_cl in (cmdline, alias_cmdline):
        (_, kwargs) = parse_args_and_kwargs(this_cl)
        if ('target' in kwargs):
            log.debug('target    is    in    kwargs    {}.'.format(kwargs))
            if ('tgt_type' in kwargs):
                log.debug('tgt_type    is    in    kwargs    {}.'.format(kwargs))
                return {'target': kwargs['target'], 'tgt_type': kwargs['tgt_type']}
            return {'target': kwargs['target'], 'tgt_type': 'glob'}
    for this_cl in (cmdline, alias_cmdline):
        checked = check_cmd_against_group(this_cl[0])
        log.debug('this    cmdline    has    target    {}.'.format(this_cl))
        if checked.get('target'):
            return checked
    return null_target

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

def get_target(permitted_group, cmdline, alias_cmdline):