<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_http(base_url, function, opts):
 """HTTP request generator."""

    url = (os.path.join(base_url, function) + '/?' + urlencode(opts))
    data = urlopen(url)

    if data.code != 200:
        raise ValueError("Random.rg returned server code: " + str(data.code))
    return data.read()