code: def _greater_than_indices(
      left: pd.Series,
      right: pd.Series,
      strict: bool,
      multiple_conditions: bool,
      keep: str,
  ) -> tuple:
      """
      Use binary search to get indices where left
      is greater than or equal to right.
  
      If strict is True, then only indices
      where `left` is greater than
      (but not equal to) `right` are returned.
  
      if multiple_conditions is False, a tuple of integer indexes
      for left and right is returned;
      else a tuple of the index for left, right, as well
      as the positions of left in right is returned.
      """
  
      # quick break, avoiding the hassle
      if left.max() < right.min():
          return None
  
      outcome = _null_checks_cond_join(left=left, right=right)
      if not outcome:
          return None
      (
          left,
          right,
          left_index,
          right_index,
          right_is_sorted,
          any_nulls,
      ) = outcome
  
      search_indices = right.searchsorted(left, side="right")
      # if any of the positions in `search_indices`
      # is equal to 0 (less than 1), it implies that
      # left[position] is not greater than any value
      # in right
      rows_equal = search_indices < 1
      if rows_equal.any():
          left = left[~rows_equal]
          left_index = left_index[~rows_equal]
          search_indices = search_indices[~rows_equal]
  
      # the idea here is that if there are any equal values
      # shift downwards to the immediate next position
      # that is not equal
      if strict:
          rows_equal = right[search_indices - 1]
          rows_equal = left == rows_equal
          # replace positions where rows are equal with
          # searchsorted('left');
          # this works fine since we will be using the value
          # as the right side of a slice, which is not included
          # in the final computed value
          if rows_equal.any():
              replacements = right.searchsorted(left, side="left")
              # now we can safely replace values
              # with strictly greater than positions
              search_indices = np.where(
                  rows_equal, replacements, search_indices
              )
          # any value less than 1 should be discarded
          # since the lowest value for binary search
          # with side='right' should be 1
          rows_equal = search_indices < 1
          if rows_equal.any():
              left = left[~rows_equal]
              left_index = left_index[~rows_equal]
              search_indices = search_indices[~rows_equal]
  
          if not search_indices.size:
              return None
  
      if multiple_conditions:
          return left_index, right_index, search_indices
      if right_is_sorted and (keep == "last"):
          if any_nulls:
              return left_index, right_index[search_indices - 1]
          return left_index, search_indices - 1
      right = [right_index[:ind] for ind in search_indices]
      if keep == "first":
          right = [arr.min() for arr in right]
          return left_index, right
      if keep == "last":
          right = [arr.max() for arr in right]
          return left_index, right
      right = np.concatenate(right)
      left = np.repeat(left_index, search_indices)
      return 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 24 for calling a global function with example usage: _greater_than_indices(left, right, strict, multiple_conditions, keep) and returns: left,  right, None, None, left_index,  right_index,  search_indices, left_index,  unknown, left_index,  right, left_index,  right, None, left_index,  right_index