'Generate and return a URL from one seen in the subreddit.
The URL returned may be "self" indicating a self post. This should
happen with the same frequency it is seen in the modeled subreddit.'

def generate_link_url(self):

    if (random.random() < self.selfpost_frequency):
        return 'self'
    else:
        return random.choice(self.urls)
