def METHOD_NAME(legacy_url: str, split_url: str, genesis_height: int) -> int:
    legacy_head_height = get_head(legacy_url)
    split_head_height = get_head(split_url)
    if legacy_head_height <= genesis_height:
        logger.error(
            '{} head must be higher than genesis. Got {} and {}',
            legacy_url,
            legacy_head_height,
            genesis_height,
        )
        sys.exit(1)
    if split_head_height <= genesis_height:
        logger.error(
            '{} head must be higher than genesis. Got {} and {}',
            split_url,
            split_head_height,
            genesis_height,
        )
        sys.exit(1)
    return min(legacy_head_height, split_head_height)