def _test_owner(kwargs, user=None):
 if user:
  return user
 if ('owner' in kwargs):
  log.warning('Use of argument owner found, "owner" is invalid, please use "user"')
  return kwargs['owner']
 return user

def _test_owner ( kwargs , user = None ) : if user : return user if ( 'owner' in kwargs ) : log . warning ( 'Use of argument owner found, "owner" is invalid, please use "user"' ) return kwargs [ 'owner' ] return user
convert owner to user .