code: def nth_value(expr, nth, skip_nulls=False, sort=None, ascending=True):
      
      return _cumulative_op(expr, NthValue, data_type=expr._data_type, sort=sort,
                            ascending=ascending, _nth=nth, _skip_nulls=skip_nulls)
docs: Get nth value of a grouped and sorted expression.
  
      :param expr: expression for calculation
      :param nth: integer position
      :param skip_nulls: whether to skip null values, False by default
      :param sort: name of the sort column
      :param ascending: whether to sort in ascending order
      :return: calculated column