<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_stored_variation(self, experiment, user_profile):
 """ Determine if the user has a stored variation available for the given experiment and return that. Args: experiment: Object representing the experiment for which user is to be bucketed. user_profile: UserProfile object representing the user's profile. Returns: Variation if available. None otherwise. """


    user_id = user_profile.user_id
    variation_id = user_profile.get_variation_for_experiment(experiment.id)

    if variation_id:
      variation = self.config.get_variation_from_id(experiment.key, variation_id)
      if variation:
        self.logger.info('Found a stored decision. User "%s" is in variation "%s" of experiment "%s".' % (
          user_id,
          variation.key,
          experiment.key
        ))
        return variation

    return None