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)
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