code: def _not_equal_indices(
      left: pd.Series, right: pd.Series, keep: str
  ) -> tuple:
      """
      Use binary search to get indices where
      `left` is exactly  not equal to `right`.
  
      It is a combination of strictly less than
      and strictly greater than indices.
  
      A tuple of integer indexes for left and right
      is returned.
      """
  
      dummy = np.array([], dtype=int)
  
      # deal with nulls
      l1_nulls = dummy
      r1_nulls = dummy
      l2_nulls = dummy
      r2_nulls = dummy
      any_left_nulls = left.isna()
      any_right_nulls = right.isna()
      if any_left_nulls.any():
          l1_nulls = left.index[any_left_nulls.array]
          l1_nulls = l1_nulls.to_numpy(copy=False)
          r1_nulls = right.index
          # avoid NAN duplicates
          if any_right_nulls.any():
              r1_nulls = r1_nulls[~any_right_nulls.array]
          r1_nulls = r1_nulls.to_numpy(copy=False)
          nulls_count = l1_nulls.size
          # blow up nulls to match length of right
          l1_nulls = np.tile(l1_nulls, r1_nulls.size)
          # ensure length of right matches left
          if nulls_count > 1:
              r1_nulls = np.repeat(r1_nulls, nulls_count)
      if any_right_nulls.any():
          r2_nulls = right.index[any_right_nulls.array]
          r2_nulls = r2_nulls.to_numpy(copy=False)
          l2_nulls = left.index
          nulls_count = r2_nulls.size
          # blow up nulls to match length of left
          r2_nulls = np.tile(r2_nulls, l2_nulls.size)
          # ensure length of left matches right
          if nulls_count > 1:
              l2_nulls = np.repeat(l2_nulls, nulls_count)
  
      l1_nulls = np.concatenate([l1_nulls, l2_nulls])
      r1_nulls = np.concatenate([r1_nulls, r2_nulls])
  
      outcome = _less_than_indices(
          left, right, strict=True, multiple_conditions=False, keep=keep
      )
  
      if outcome is None:
          lt_left = dummy
          lt_right = dummy
      else:
          lt_left, lt_right = outcome
  
      outcome = _greater_than_indices(
          left, right, strict=True, multiple_conditions=False, keep=keep
      )
  
      if outcome is None:
          gt_left = dummy
          gt_right = dummy
      else:
          gt_left, gt_right = outcome
  
      left = np.concatenate([lt_left, gt_left, l1_nulls])
      right = np.concatenate([lt_right, gt_right, r1_nulls])
  
      if (not left.size) & (not right.size):
          return None
      return _keep_output(keep, left, right)
  
imports: from __future__ import annotations
  import fnmatch
  import inspect
  import re
  import warnings
  from collections.abc import Callable
  from dataclasses import dataclass
  from enum import Enum
  from functools import singledispatch
  from typing import Any, Callable, Hashable, Iterable, List, Literal, Optional, Pattern, Union
  import numpy
  import pandas
  from multipledispatch import dispatch
  from pandas.api.types import is_bool_dtype, is_datetime64_dtype, is_list_like, is_scalar, is_string_dtype, union_categoricals
  from pandas.core.common import is_bool_indexer
  from pandas.core.groupby.generic import DataFrameGroupBy, SeriesGroupBy
  from janitor.utils import _expand_grid, check, check_column, find_stack_level
label_desc: Use image node_id 25 for calling a global function with example usage: _not_equal_indices(left, right, keep) and returns: _keep_output, None