docs: def _get_feature_variable_for_type(self, feature_key, variable_key, variable_type, user_id, attributes):
      """ Helper method to determine value for a certain variable attached to a feature flag based on type of variable.
  
      Args:
        feature_key: Key of the feature whose variable's value is being accessed.
        variable_key: Key of the variable whose value is to be accessed.
        variable_type: Type of variable which could be one of boolean/double/integer/string.
        user_id: ID for user.
        attributes: Dict representing user attributes.
  
      Returns:
        Value of the variable. None if:
        - Feature key is invalid.
        - Variable key is invalid.
        - Mismatch with type of variable.
      """
      if not validator.is_non_empty_string(feature_key):
        self.logger.error(enums.Errors.INVALID_INPUT_ERROR.format('feature_key'))
        return None
  
      if not validator.is_non_empty_string(variable_key):
        self.logger.error(enums.Errors.INVALID_INPUT_ERROR.format('variable_key'))
        return None
  
      if not isinstance(user_id, string_types):
        self.logger.error(enums.Errors.INVALID_INPUT_ERROR.format('user_id'))
        return None
  
      if not self._validate_user_inputs(attributes):
        return None
  
      feature_flag = self.config.get_feature_from_key(feature_key)
      if not feature_flag:
        return None
  
      variable = self.config.get_variable_for_feature(feature_key, variable_key)
      if not variable:
        return None
  
      # Return None if type differs
      if variable.type != variable_type:
        self.logger.warning(
          'Requested variable type "%s", but variable is of type "%s". '
          'Use correct API to retrieve value. Returning None.' % (variable_type, variable.type)
        )
        return None
  
      feature_enabled = False
      source_info = {}
      variable_value = variable.defaultValue
      decision = self.decision_service.get_variation_for_feature(feature_flag, user_id, attributes)
      if decision.variation:
  
        feature_enabled = decision.variation.featureEnabled
        if feature_enabled:
          variable_value = self.config.get_variable_value_for_variation(variable, decision.variation)
          self.logger.info(
            'Got variable value "%s" for variable "%s" of feature flag "%s".' % (
              variable_value, variable_key, feature_key
            )
          )
        else:
          self.logger.info(
            'Feature "%s" for variation "%s" is not enabled. '
            'Returning the default variable value "%s".' % (feature_key, decision.variation.key, variable_value)
          )
      else:
        self.logger.info(
          'User "%s" is not in any variation or rollout rule. '
          'Returning default value for variable "%s" of feature flag "%s".' % (user_id, variable_key, feature_key)
        )
  
      if decision.source == enums.DecisionSources.FEATURE_TEST:
        source_info = {
          'experiment_key': decision.experiment.key,
          'variation_key': decision.variation.key
        }
  
      try:
        actual_value = self.config.get_typecast_value(variable_value, variable_type)
      except:
        self.logger.error('Unable to cast value. Returning None.')
        actual_value = None
  
      self.notification_center.send_notifications(
        enums.NotificationTypes.DECISION,
        enums.DecisionNotificationTypes.FEATURE_VARIABLE,
        user_id,
        attributes or {},
        {
          'feature_key': feature_key,
          'feature_enabled': feature_enabled,
          'source': decision.source,
          'variable_key': variable_key,
          'variable_value': actual_value,
          'variable_type': variable_type,
          'source_info': source_info
        }
      )
      return actual_value