human
I wrote the below code

    if (not target):
        target = css.CSSStyleSheet(href=sheet.href, media=sheet.media, title=sheet.title)
    def getReplacer(targetbase):
        'Return    a    replacer    which    uses    base    to    return    adjusted    URLs'
        (basesch, baseloc, basepath, basequery, basefrag) = urlparse.urlsplit(targetbase)
        (basepath, basepathfilename) = os.path.split(basepath)
        def replacer(uri):
            (scheme, location, path, query, fragment) = urlparse.urlsplit(uri)
            if ((not scheme) and (not location) and (not path.startswith(u'/'))):
                (path, filename) = os.path.split(path)
                combined = os.path.normpath(os.path.join(basepath, path, filename))
                return urllib.pathname2url(combined)
            else:
                return uri
        return replacer
    for rule in sheet.cssRules:
        if (rule.type == rule.CHARSET_RULE):
            pass
        elif (rule.type == rule.IMPORT_RULE):
            log.info((u'Processing    @import    %r' % rule.href), neverraise=True)
            if rule.hrefFound:
                target.add(css.CSSComment(cssText=(u'/*    START    @import    "%s"    */' % rule.href)))
                try:
                    importedSheet = resolveImports(rule.styleSheet)
                except xml.dom.HierarchyRequestErr as e:
                    log.warn((u'@import:    Cannot    resolve    target,    keeping    rule:    %s' % e), neverraise=True)
                    target.add(rule)
                else:
                    log.info((u'@import:    Adjusting    paths    for    %r' % rule.href), neverraise=True)
                    replaceUrls(importedSheet, getReplacer(rule.href), ignoreImportRules=True)
                    if (rule.media.mediaText == u'all'):
                        mediaproxy = None
                    else:
                        keepimport = False
                        for r in importedSheet:
                            if (r.type not in (r.COMMENT, r.STYLE_RULE, r.IMPORT_RULE)):
      ...

What's a good function header?

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

def resolveImports(sheet, target=None):