def user_factory(**kw):
 global user_factory_counter
 email = kw.pop('email', ('factoryuser%d' % user_factory_counter))
 if ('@' not in email):
  email = ('%s@mozilla.com' % email)
 user = UserProfile.objects.create(email=email, **kw)
 if ('email' not in kw):
  user_factory_counter = (user.id + 1)
 return user

def user_factory ( ** kw ) : global user_factory_counter email = kw . pop ( 'email' , ( 'factoryuser%d' % user_factory_counter ) ) if ( '@' not in email ) : email = ( '%s@mozilla.com' % email ) user = UserProfile . objects . create ( email = email , ** kw ) if ( 'email' not in kw ) : user_factory_counter = ( user . id + 1 ) return user
if not provided .