human
I wrote the below code

    def _check_units(path):
        "Verify    all    the    units    given    by    `path'"
        for file in glob.glob(path):
            cmd = subprocess.run(['/usr/bin/systemd-analyze', 'verify', '--no-pager', file], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
            if cmd.stdout:
                def _check_line(line):
                    if ('dcos-' not in line):
                        return True
                    ignore_new_directives = ['TasksMax']
                    for directive in ignore_new_directives:
                        unknown_lvalue_err = ("Unknown    lvalue    '%s'" % directive)
                        if (unknown_lvalue_err in line):
                            pass
                        else:
                            return False
                    return True
                for line in cmd.stdout.split('\n'):
                    if (not _check_line(line)):
                        pytest.fail(('Invalid    systemd    unit:    ' + line))
    _check_units('/etc/systemd/system/dcos-*.service')
    _check_units('/etc/systemd/system/dcos-*.socket')

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

def test_verify_units():