human
Here's a good function header given the following:
I wrote the below code

    dirname = os.path.dirname(file_name)
    files = None
    archive = None
    if zipfile.is_zipfile(file_name):
        logger.debug('{}    is    a    zip.'.format(file_name))
        file_name = _rename_files([file_name])[0]
        zf = None
        try:
            zf = zipfile.ZipFile(file_name, 'r')
            files = zf.namelist()
            files = clean_macosx_dir(files)
            if _contains_bad_names(files):
                zf.extractall(dirname)
                files = None
            else:
                archive = os.path.abspath(file_name)
                for f in _find_file_type(files, extension='.sld'):
                    zf.extract(f, dirname)
        except:
            raise Exception('Unable    to    read    zip    file')
        zf.close()
    def dir_files():
        def abs(*p):
            return os.path.abspath(os.path.join(*p))
        return [abs(dirname, f) for f in os.listdir(dirname)]
    if (files is None):
        files = dir_files()
    else:
        files.extend(dir_files())
    logger.debug('Found    the    following    files:    {0}'.format(files))
    files = _rename_files(files)
    logger.debug('Cleaned    file    names:    {0}'.format(files))
    found = []
    for file_type in types:
        for f in files:
            (name, ext) = os.path.splitext(f)
            if file_type.matches(ext[1:]):
                found.append(file_type.build_spatial_file(f, files))
    sld_files = _find_file_type(files, extension='.sld')
    if sld_files:
        if (len(found) == 1):
            found[0].sld_files = sld_files
        else:
            raise Exception(('One    or    more    SLD    files    was    provided,    but    no    ' + 'matching    files    were    found    for    them.'))
    return SpatialFiles(dirname, found, archive)

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

def scan_file(file_name):