def METHOD_NAME(policy_path, attr_helper):
    try:
        outfile = tempfile.NamedTemporaryFile()
    except IOError as e:
        sys.stderr.write("could not open attribute output file\n")
        return None
    fd = open("/dev/null", "w")
    if policy_path:
        ret = subprocess.Popen([attr_helper, outfile.name, policy_path], stdout=fd).wait()
    else:
        ret = subprocess.Popen([attr_helper, outfile.name], stdout=fd).wait()
    fd.close()
    if ret != 0:
        sys.stderr.write("could not run attribute helper\n")
        return None
    attrs = interfaces.AttributeSet()
    try:
        attrs.from_file(outfile)
    except:
        print("error parsing attribute info")
        return None
    return attrs