human
I wrote the below code

    def _list_tar(name, cached, decompress_cmd, failhard=False):
        '\n                                List    the    contents    of    a    tar    archive.\n                                '
        dirs = []
        files = []
        links = []
        try:
            open_kwargs = ({'name': cached} if (not isinstance(cached, subprocess.Popen)) else {'fileobj': cached.stdout, 'mode': 'r|'})
            with contextlib.closing(tarfile.open(**open_kwargs)) as tar_archive:
                for member in tar_archive.getmembers():
                    if member.issym():
                        links.append(member.name)
                    elif member.isdir():
                        dirs.append((member.name + '/'))
                    else:
                        files.append(member.name)
            return (dirs, files, links)
        except tarfile.ReadError:
            if failhard:
                if isinstance(cached, subprocess.Popen):
                    stderr = cached.communicate()[1]
                    if (cached.returncode != 0):
                        raise CommandExecutionError('Failed    to    decompress    {0}'.format(name), info={'error': stderr})
            else:
                if (not salt.utils.path.which('tar')):
                    raise CommandExecutionError("'tar'    command    not    available")
                if (decompress_cmd is not None):
                    try:
                        decompress_cmd = '    '.join([_quote(x) for x in shlex.split(decompress_cmd)])
                    except AttributeError:
                        raise CommandExecutionError('Invalid    CLI    options')
                elif (salt.utils.path.which('xz') and (__salt__['cmd.retcode'](['xz', '-t', cached], python_shell=False, ignore_retcode=True) == 0)):
                    decompress_cmd = 'xz    --decompress    --stdout'
                if decompress_cmd:
                    decompressed = subprocess.Popen('{0}    {1}'.format(decompress_cmd, _quote(cached)), shell=True, stdout=subprocess.PIPE,...

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

def list_(name, archive_format=None, options=None, strip_components=None, clean=False, verbose=False, saltenv='base'):