code: def tiecorrect(xranks):
      """
  
      should be equivalent of scipy.stats.tiecorrect
  
      """
      # casting to int rounds down, but not relevant for this case
      rankbincount = np.bincount(np.asarray(xranks, dtype=int))
      nties = rankbincount[rankbincount > 1]
      ntot = float(len(xranks))
      tiecorrection = 1 - (nties**3 - nties).sum() / (
          ntot**3 - ntot
      )
      return tiecorrection
  
imports: from collections import namedtuple
  from statsmodels.compat.python import lzip, lrange
  import copy
  import math
  import numpy
  from numpy.testing import assert_almost_equal, assert_equal
  from scipy import stats, interpolate
  from statsmodels.iolib.table import SimpleTable
  from statsmodels.stats.multitest import multipletests, _ecdf, fdrcorrection, fdrcorrection_twostage
  from statsmodels.graphics import utils
  from statsmodels.tools.sm_exceptions import ValueWarning
label_desc: Use image node_id 13 for calling a global function with example usage: tiecorrect(xranks) and returns: tiecorrection