Depends on your intended purpose. If you want to see how q2 add_new_account does it, the code can be seen here: https://code.q2developer.com/Q2Antilles/q2-sdk/-/blob/develop/sdk/q2_sdk/entrypoints/add_new_account.py
But it should be known, this is only useful in dev. This is not how accounts get created in actual environments. In actual environments accounts are created on the Bank's core and at login, the account is pulled and loaded into the Q2 DB.