def get_block(block_id, api_code=None):
resource = '<STR_LIT>' + block_id<EOL>if api_code is not None:<EOL><INDENT>resource += '<STR_LIT>' + api_code<EOL><DEDENT>response = util.call_api(resource)<EOL>json_response = json.loads(response)<EOL>return Block(json_response)<EOL>
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