You cant do what you asked.
You can however achieve the exact same results by:
Add 10 scale bars with unique names 'Off page', in different styles and stuff, and then use python to move them onto the
page as needed for different maps.
OR
Create 10 "MXD" templates with different page setups, and use the code to determine which template to use.
OR
Think of something else ..be creative!