Cleaner if just one line?  Not even worth abstracting into a whole function
    return getattr(problem, 'shared_rng', random.Random(self.context['seed']))