code: def chebyshev6cost(trial, M=61):
      """The costfunction for order-n Chebyshev fitting.
      M evaluation points between [-1, 1], and two end points"""
      from mystic.models._model_helper import (
          chebyshev,
          chebyshev6coeffs,
      )
  
      return chebyshev(trial, chebyshev6coeffs, M)
  
imports: from .abstract_model import AbstractModel
  from numpy import sum
  from numpy import asarray
  from mystic.math import polyeval, poly1d
  from mystic.models._model_helper import chebyshev2coeffs, chebyshev4coeffs, chebyshev6coeffs, chebyshev8coeffs, chebyshev16coeffs
label_desc: Use image node_id 4 for calling a global function with example usage: chebyshev6cost(trial, M) and returns: chebyshev