<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_config(self, budget):
 """Function to sample a new configuration This function is called inside BOHB to query a new configuration Parameters: budget: float the budget for which this configuration is scheduled Returns ------- config return a valid configuration with parameters and budget """

        logger.debug('start sampling a new configuration.')
        sample = None
        info_dict = {}

        # If no model is available, sample from prior
        # also mix in a fraction of random configs
        if len(self.kde_models.keys()) == 0 or np.random.rand() < self.random_fraction:
            sample = self.configspace.sample_configuration()
            info_dict['model_based_pick'] = False

        if sample is None:
            sample, info_dict= self.sample_from_largest_budget(info_dict)

        sample = ConfigSpace.util.deactivate_inactive_hyperparameters(
            configuration_space=self.configspace,
            configuration=sample.get_dictionary()
        ).get_dictionary()

        logger.debug('done sampling a new configuration.')
        sample['TRIAL_BUDGET'] = budget
        return sample