def METHOD_NAME(
    network: str,
    provider_uri: str,
    registry: Optional[BaseContractRegistry] = None,
    log: Logger = IP_DETECTION_LOGGER,
) -> Union[str, None]:
    # Prevents circular imports
    from nucypher.characters.lawful import Ursula
    from nucypher.network.nodes import TEACHER_NODES
    base_error = 'Cannot determine IP using default teacher'
    if network not in TEACHER_NODES:
        log.debug(f'{base_error}: Unknown network "{network}".')
        return
    node_storage = LocalFileBasedNodeStorage()
    Ursula.set_cert_storage_function(node_storage.store_node_certificate)
    external_ip = None
    for teacher_uri in TEACHER_NODES[network]:
        try:
            teacher = Ursula.from_teacher_uri(
                teacher_uri=teacher_uri, provider_uri=provider_uri, min_stake=0
            )  # TODO: Handle customized min stake here.
            # TODO: Pass registry here to verify stake (not essential here since it's a hardcoded node)
            external_ip = _request_from_node(teacher=teacher, provider_uri=provider_uri)
            # Found a reachable teacher, return from loop
            if external_ip:
                break
        except NodeSeemsToBeDown:
            # Teacher is unreachable, try next one
            continue
    if not external_ip:
        log.debug(f'{base_error}: No teacher available for network "{network}".')
        return
    return external_ip