def _get_parity_url_by_block(parity_hosts, block):
    """
    Get url of a parity JSON RPC API for specified block

    Parameters
    ----------
    parity_hosts : list
        List of tuples with each parity JSON RPC url and used block range
    block : int
        Block number

    Returns
    -------
    str
        Url of parity API that will serve specified block
    """
    for bottom_line, upper_bound, url in parity_hosts:
        if ((not bottom_line) or (block >= bottom_line)) and ((not upper_bound) or (block < upper_bound)):
            return url