code: def gpd_es_calculator(
      var_estimate, threshold, scale_param, shape_param
  ):
      result = 0
      if (1 - shape_param) != 0:
          # this formula is from Gilli and Kellezi pg. 8
          var_ratio = var_estimate / (1 - shape_param)
          param_ratio = (scale_param - (shape_param * threshold)) / (
              1 - shape_param
          )
          result = var_ratio + param_ratio
      return result
  
imports: from __future__ import division
  import math
  import pandas
  import numpy
  from math import pow
  from scipy import stats, optimize
  from six import iteritems
  from sys import float_info
  from .utils import nanmean, nanstd, nanmin, up, down, roll, rolling_window
  from .periods import ANNUALIZATION_FACTORS, APPROX_BDAYS_PER_YEAR
  from .periods import DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLY
label_desc: Use image node_id 36 for calling a global function with example usage: gpd_es_calculator(var_estimate, threshold, scale_param, shape_param) and returns: result