def _visible_fields(user_profile, user, configuration=None):
 if (not configuration):
  configuration = settings.ACCOUNT_VISIBILITY_CONFIGURATION
 profile_visibility = get_profile_visibility(user_profile, user, configuration)
 if (profile_visibility == ALL_USERS_VISIBILITY):
  return configuration.get('shareable_fields')
 else:
  return configuration.get('public_fields')

def _visible_fields ( user_profile , user , configuration = None ) : if ( not configuration ) : configuration = settings . ACCOUNT_VISIBILITY_CONFIGURATION profile_visibility = get_profile_visibility ( user_profile , user , configuration ) if ( profile_visibility == ALL_USERS_VISIBILITY ) : return configuration . get ( 'shareable_fields' ) else : return configuration . get ( 'public_fields' )
return what fields should be visible based on user settings .