def get_access_path(key, parts):
path = []<EOL>for is_attribute, specifier in parts:<EOL><INDENT>if is_attribute:<EOL><INDENT>path.append("<STR_LIT>".format(specifier))<EOL><DEDENT>else:<EOL><INDENT>path.append("<STR_LIT>".format(specifier))<EOL><DEDENT><DEDENT>return str(key) + "<STR_LIT>".join(path)<EOL>
Given a list of format specifiers, returns
    the final access path (e.g. a.b.c[0][1]).