code: def median(a, weights=None, axis=None, keepdims: bool = False):
      """
      Compute the weighted median along the specified axis.
  
      After https://en.wikipedia.org/wiki/Percentile#Weighted_percentile
  
      :param a: Array containing numbers whose median is desired. If `a` is not an
          array, a conversion is attempted.
      :param weights: Array containing weights for the elements of `a`. If `weights` is not an
          array, a conversion is attempted.
      :param axis: Axis or axes along which the means are computed. The default is to
          compute the mean of the flattened array. Type is None or int or tuple of ints, optional.
      :param bool keepdims: If this is set to True, the axes which are reduced are left
          in the result as dimensions with size one.
      :return: number or array
      """
      return quantile(
          a, q=0.5, weights=weights, axis=axis, keepdims=keepdims
      )
  
file_path: popmon/popmon/stats/numpy.py
imports: import numpy
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: median(a, weights, axis, keepdims) and returns: quantile