code: def percentile_alphabetical(vec, terms, other_vec=None):
      scale_df = pd.DataFrame({"scores": vec, "terms": terms})
      if other_vec is not None:
          scale_df["others"] = other_vec
      else:
          scale_df["others"] = 0
      vec_ss = (
          scale_df.sort_values(
              by=["scores", "terms", "others"],
              ascending=[True, True, False],
          )
          .reset_index()
          .sort_values(by="index")
          .index
      )
      return scale_0_to_1(vec_ss)
  
imports: from typing import Callable
  import numpy
  import pandas
  from scipy.stats import rankdata
label_desc: Use image node_id 25 for calling a global function with example usage: percentile_alphabetical(vec, terms, other_vec) and returns: scale_0_to_1