code: def __init__(self, ndim=2):  # is n-dimensional
      AbstractFunction.__init__(self, ndim=ndim)
      return
  
imports: from .abstract_model import AbstractFunction
  from math import sin, cos, sqrt, pi, exp
label_desc: Use image node_id 1 to create a new Rastrigin object from inherited base classes: AbstractFunction with example: obj = Rastrigin(ndim)