<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_web(network_id: int, host: Optional[str] = None) -> BELGraph: """Retrieve a public network from BEL Commons. In the future, this function may be extended to support authentication. :param int network_id: The BEL Commons network identifier :param Optional[str] host: The location of the BEL Commons server. Alternatively, looks up in PyBEL config with ``PYBEL_REMOTE_HOST`` or the environment as ``PYBEL_REMOTE_HOST`` Defaults to :data:`pybel.constants.DEFAULT_SERVICE_URL` :rtype: pybel.BELGraph """

    if host is None:
        host = _get_host()

    url = host + GET_ENDPOINT.format(network_id)
    res = requests.get(url)
    graph_json = res.json()
    graph = from_json(graph_json)
    return graph