code: def scoreatpercentile(data, percentile):
      """Return the score at the given percentile of the data.
  
      Example:
          >>> data = randn(100)
              >>> scoreatpercentile(data, 50)
  
          will return the median of sample `data`.
      """
      per = np.array(percentile)
      cdf = empiricalcdf(data)
      interpolator = interpolate.interp1d(np.sort(cdf), np.sort(data))
      return interpolator(per / 100.0)
  
file_path: statsmodels/statsmodels/sandbox/stats/stats_dhuard.py
imports: import scipy.interpolate
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: scoreatpercentile(data, percentile) and returns: interpolator