<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_random(self):
 """Get a kitten, either from the db, or a new one. """

        num_kittens = self.count()
        new_cutoff = (num_kittens / (num_kittens + constants.KITTEN_FRESHNESS))
        if random.random() < new_cutoff:
            return self._rand_inst()
        else:
            return self.create_new()