Add flatten_dict decorator
@@ -7,3 +7,11 @@ def inner(*args):
return list(method(*args))
return inner
+
+
+def flatten_dict(method):
+ @wraps(method)
+ def inner(*args):
+ return dict(method(*args))
+
+ return inner
