<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_block(block_id, api_code=None):
 """Get a single block based on a block hash. :param str block_id: block hash to look up :param str api_code: Blockchain.info API code (optional) :return: an instance of :class:`Block` class """


    resource = 'rawblock/' + block_id
    if api_code is not None:
        resource += '?api_code=' + api_code
    response = util.call_api(resource)
    json_response = json.loads(response)
    return Block(json_response)