def _get_overlapping_pool(pool, other_pools):
    """
    Check if the given pool overlaps with any pool in the list of other_pools.

    Ignore when a pool's CIDR is an exact match of another pool's CIDR in case
    a pool is being updated.

    :param pool: IPPool to check overlap for.
    :param other_pools: List of IPPools to check for overlap.
    :return: The first IPPool in other_pools that overlaps with pool, or None if
    no overlap.
    """
    for other_pool in other_pools:
        # Allow the cidr to be exactly the same in case pool is being updated,
        # for example to add/remove IP-IP support.
        if ((pool.cidr in other_pool.cidr or other_pool.cidr in pool.cidr) and
            (pool.cidr != other_pool.cidr)):
            return other_pool

    return None