code: def infer_lambda(model, *_, xmin, xmax):
      """
      infer lambda and intercept based on linear fitting at the base points.
      """
      x = np.linspace(xmin, xmax).reshape((-1, 1))
      y = np.ravel(model(mx.nd.array(x))[0].asnumpy())
      slope, intercept = np.polyfit(np.ravel(x), np.ravel(y), 1)
      return -slope
  
file_path: gluonts/src/gluonts/nursery/gmm_tpp/gmm_base.py
imports: import time
  import mxnet
  from mxnet import gluon
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: infer_lambda(model) and returns: unknown