def AppIdWithDefaultPartition(app_id, default_partition):
 if (not default_partition):
  return app_id
 if ('~' in app_id):
  return app_id
 return ((default_partition + '~') + app_id)

def AppIdWithDefaultPartition ( app_id , default_partition ) : if ( not default_partition ) : return app_id if ( '~' in app_id ) : return app_id return ( ( default_partition + '~' ) + app_id )
add a partition to an application id if necessary .