code: def _find_ambiguous_and_nonexistent(
      data: DatetimeColumn, zone_name: str
  ) -> Tuple:
      """
      Recognize ambiguous and nonexistent timestamps for the given timezone.
  
      Returns a tuple of columns, both of "bool" dtype and of the same
      size as `data`, that respectively indicate ambiguous and
      nonexistent timestamps in `data` with the value `True`.
  
      Ambiguous and/or nonexistent timestamps are only possible if any
      transitions occur in the time zone database for the given timezone.
      If no transitions occur, the tuple `(False, False)` is returned.
      """
      tz_data_for_zone = get_tz_data(zone_name)
      transition_times = tz_data_for_zone["transition_times"]
      offsets = tz_data_for_zone["offsets"].astype(
          f"timedelta64[{data._time_unit}]"
      )
  
      if len(offsets) == 1:  # no transitions
          return False, False
  
      transition_times, offsets, old_offsets = (
          transition_times[1:]._column,
          offsets[1:]._column,
          offsets[:-1]._column,
      )
  
      # Assume we have two clocks at the moment of transition:
      # - Clock 1 is turned forward or backwards correctly
      # - Clock 2 makes no changes
      clock_1 = transition_times + offsets
      clock_2 = transition_times + old_offsets
  
      # At the start of an ambiguous time period, Clock 1 (which has
      # been turned back) reads less than Clock 2:
      cond = clock_1 < clock_2
      ambiguous_begin = clock_1.apply_boolean_mask(cond)
  
      # The end of an ambiguous time period is what Clock 2 reads at
      # the moment of transition:
      ambiguous_end = clock_2.apply_boolean_mask(cond)
      ambiguous = label_bins(
          data,
          left_edges=ambiguous_begin,
          left_inclusive=True,
          right_edges=ambiguous_end,
          right_inclusive=False,
      ).notnull()
  
      # At the start of a non-existent time period, Clock 2 reads less
      # than Clock 1 (which has been turned forward):
      cond = clock_1 > clock_2
      nonexistent_begin = clock_2.apply_boolean_mask(cond)
  
      # The end of the non-existent time period is what Clock 1 reads
      # at the moment of transition:
      nonexistent_end = clock_1.apply_boolean_mask(cond)
      nonexistent = label_bins(
          data,
          left_edges=nonexistent_begin,
          left_inclusive=True,
          right_edges=nonexistent_end,
          right_inclusive=False,
      ).notnull()
  
      return ambiguous, nonexistent
  
imports: import os
  import zoneinfo
  from functools import lru_cache
  from typing import Tuple, cast
  import numpy
  import pandas
  import cudf
  from cudf._lib.labeling import label_bins
  from cudf._lib.search import search_sorted
  from cudf._lib.timezone import make_timezone_transition_table
  from cudf.core.column.column import as_column, build_column
  from cudf.core.column.datetime import DatetimeColumn, DatetimeTZColumn
  from cudf.core.dataframe import DataFrame
  from cudf.utils.dtypes import _get_base_dtype
label_desc: Use image node_id 5 for calling a global function with example usage: _find_ambiguous_and_nonexistent(data, zone_name) and returns: ambiguous,  nonexistent, False,  False