docs: def is_user_profile_valid(user_profile):
    """ Determine if provided user profile is valid or not.
  
    Args:
      user_profile: User's profile which needs to be validated.
  
    Returns:
      Boolean depending upon whether profile is valid or not.
    """
  
    if not user_profile:
      return False
  
    if not type(user_profile) is dict:
      return False
  
    if UserProfile.USER_ID_KEY not in user_profile:
      return False
  
    if UserProfile.EXPERIMENT_BUCKET_MAP_KEY not in user_profile:
      return False
  
    experiment_bucket_map = user_profile.get(UserProfile.EXPERIMENT_BUCKET_MAP_KEY)
    if not type(experiment_bucket_map) is dict:
      return False
  
    for decision in experiment_bucket_map.values():
      if type(decision) is not dict or UserProfile.VARIATION_ID_KEY not in decision:
        return False
  
    return True