#NEWLINE# def ast_for_dotted_name( dotted_name ) : #NEWLINE# #INDENT# parts = dotted_name . split ( '.' ) #NEWLINE# name = ast . Name ( id = parts . pop ( 0 ) , ctx = Load ) #NEWLINE# res = name #NEWLINE# for part in parts : #NEWLINE# #INDENT# attr = ast . Attribute ( ) #NEWLINE# attr . value = name #NEWLINE# attr . attr = part #NEWLINE# attr . ctx = Load #NEWLINE# res = attr #NEWLINE# #UNINDENT# return res