docs: def _normalize_input_factory(alg):
      """
      Create a function that will normalize unicode input data.
  
      Parameters
      ----------
      alg : ns enum
          Used to indicate how to normalize unicode.
  
      Returns
      -------
      func : callable
          A function that accepts string (unicode) input and returns the
          the input normalized with the desired normalization scheme.
  
      """
      normalization_form = "NFKD" if alg & ns.COMPATIBILITYNORMALIZE else "NFD"
      wrapped = partial(normalize, normalization_form)
      if NEWPY:
          return wrapped
      else:
          return lambda x, _f=wrapped: _f(x) if isinstance(x, py23_str) else x