def first(dmap_data, *path):
if not (path and isinstance(dmap_data, list)):<EOL><INDENT>return dmap_data<EOL><DEDENT>for key in dmap_data:<EOL><INDENT>if path[<NUM_LIT:0>] in key:<EOL><INDENT>return first(key[path[<NUM_LIT:0>]], *path[<NUM_LIT:1>:])<EOL><DEDENT><DEDENT>return None<EOL>
Look up a value given a path in some parsed DMAP data.