Tipalti configuration objects can contain nested sections such as supplier onboarding, payment settings, and approval rules. Implement a function that renders the hierarchy of a nested object using two spaces for each indentation level.
The input is a nested Python dictionary. Each dictionary key represents a structure node. A value that is another dictionary contains child nodes. An empty dictionary represents a leaf node. Keys must be printed in their original insertion order, and every node must appear on its own line.
Return the complete formatted structure as a single string. Do not print directly from the function.
obj, a nested dictionary whose values are either dictionaries or None.0.None value is a leaf and has no children.def print_structure(obj):