def get(vals, key, default_val=None):
val = vals<EOL>for part in key.split('<STR_LIT:.>'):<EOL><INDENT>if isinstance(val, dict):<EOL><INDENT>val = val.get(part, None)<EOL>if val is None:<EOL><INDENT>return default_val<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return default_val<EOL><DEDENT><DEDENT>return val<EOL>
Returns a dictionary value