code: def _normalize_categorical(input_col, other):
      if isinstance(input_col, cudf.core.column.CategoricalColumn):
          if cudf.api.types.is_scalar(other):
              try:
                  other = input_col._encode(other)
              except ValueError:
                  # When other is not present in categories,
                  # fill with Null.
                  other = None
              other = cudf.Scalar(other, dtype=input_col.codes.dtype)
          elif isinstance(other, cudf.core.column.CategoricalColumn):
              other = other.codes
  
          input_col = input_col.codes
      return input_col, other
  
file_path: cudf/python/cudf/cudf/core/_internals/where.py
imports: import warnings
  from typing import Tuple, Union
  import numpy
  import cudf
  from cudf._typing import ScalarLike
  from cudf.api.types import _is_non_decimal_numeric_dtype, is_bool_dtype, is_scalar
  from cudf.core.column import ColumnBase
  from cudf.core.dtypes import CategoricalDtype
  from cudf.utils.dtypes import _can_cast, _dtype_can_hold_element, find_common_type, is_mixed_with_object_dtype
label_desc: Use image node_id 1 for calling a global function with example usage: _normalize_categorical(input_col, other) and returns: input_col,  other