def _get_from_format_dict(format_dict, key):
if isinstance(format_dict[key], str):<EOL><INDENT>return format_dict[key]<EOL><DEDENT>elif isinstance(format_dict[key], (list, tuple)):<EOL><INDENT>fn_list = list(format_dict[key])<EOL>function = fn_list.pop(<NUM_LIT:0>)<EOL>if len(fn_list):<EOL><INDENT>args = fn_list.pop(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>args = []<EOL><DEDENT>if len(fn_list):<EOL><INDENT>kwargs = fn_list.pop(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>kwargs = {}<EOL><DEDENT>return function(*args, **kwargs)<EOL><DEDENT>
Return a value from our format dict.