code: def rbo(s, t, p, k=None, side="top", uneven_lengths=True):
      """
      Rank-based overlap (RBO) metric.
      Proposed in "A Similarity Measure for Indefinite Rankings" by
      Webber et al. (2010). This is the python implementation
      of gespeR::rbo from R.
  
      Parameters
      ----------
      s: array-like of shape (n,)
          Numeric vector.
      t: array-like of shape (n,)
          Numeric vector of same length as s.
      p: float between 0 and 1
          Weighting parameter in [0, 1]. High p implies strong emphasis
          on the top-ranked elements (i.e, the larger elements).
      k: None or int
          Evaluation depth for extrapolation
      side: string in {"top", "bottom"}
          Evaluate similarity between the top or the bottom of the
          ranked lists.
      uneven_lengths: bool
          Indicator if lists have uneven lengths.
  
      Returns
      -------
      Scalar value between 0 and 1, quantifying how much the
      rankings of x and y agree with each other. A higher
      values indicates greater similarity.
  
      """
      assert side in ["top", "bottom"]
      if k is None:
          k = int(np.floor(max(len(s), len(t)) / 2))
      if side == "top":
          ids = {"s": _select_ids(s, "top"), "t": _select_ids(t, "top")}
      elif side == "bottom":
          ids = {
              "s": _select_ids(s, "bottom"),
              "t": _select_ids(t, "bottom"),
          }
      return min(
          1,
          _rbo_ext(
              ids["s"], ids["t"], p, k, uneven_lengths=uneven_lengths
          ),
      )
  
imports: import numpy
  from scipy.stats import rankdata
label_desc: Use image node_id 3 for calling a global function with example usage: rbo(s, t, p, k, side, uneven_lengths) and returns: min