This is the script to generate Canvas subaccount information. The result text file list the account admins with line indentation to mark the account hierarchy.
Need Canvas token value to run the script.
python ./canvas_subaccount_admin.py <target_text_file>