human
I wrote the below code

    def _invalid_source_hash_format():
        '\n                                DRY    helper    for    reporting    invalid    source_hash    input\n                                '
        raise CommandExecutionError('Source    hash    {0}    format    is    invalid.    The    supported    formats    are:    1)    a    hash,    2)    an    expression    in    the    format    <hash_type>=<hash>,    or    3)    either    a    path    to    a    local    file    containing    hashes,    or    a    URI    of    a    remote    hash    file.    Supported    protocols    for    remote    hash    files    are:    {1}.    The    hash    may    also    not    be    of    a    valid    length,    the    following    are    supported    hash    types    and    lengths:    {2}.'.format(source_hash, ',    '.join(salt.utils.files.VALID_PROTOS), ',    '.join(['{0}    ({1})'.format(HASHES_REVMAP[x], x) for x in sorted(HASHES_REVMAP)])))
    hash_fn = None
    if os.path.isabs(source_hash):
        hash_fn = source_hash
    else:
        try:
            proto = _urlparse(source_hash).scheme
            if (proto in salt.utils.files.VALID_PROTOS):
                hash_fn = __salt__['cp.cache_file'](source_hash, saltenv)
                if (not hash_fn):
                    raise CommandExecutionError('Source    hash    file    {0}    not    found'.format(source_hash))
            elif (proto != ''):
                _invalid_source_hash_format()
        except (AttributeError, TypeError):
            _invalid_source_hash_format()
    if (hash_fn is not None):
        ret = extract_hash(hash_fn, '', file_name, source, source_hash_name)
        if (ret is None):
            _invalid_source_hash_format()
        return ret
    else:
        ret = {}
        try:
            (ret['hash_type'], ret['hsum']) = [x.strip() for x in source_hash.split('=', 1)]
        except AttributeError:
            _invalid_source_hash_format()
        except ValueError:
            if (not re.match('^[{0}]+$'.format(string.hexdigits),...

What's a good function header?

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

def get_source_sum(file_name='', source='', source_hash=None, source_hash_name=None, saltenv='base'):