def _generate_method(name, func):
 source = _method_code_template.format(method=name)
 glbls = {}
 exec_(source, glbls)
 method = njit(glbls['method'])
 @wraps(func)
 def wrapper(*args, **kwargs):
  return method(*args, **kwargs)
 return wrapper

def _generate_method ( name , func ) : source = _method_code_template . format ( method = name ) glbls = { } exec_ ( source , glbls ) method = njit ( glbls [ 'method' ] ) @ wraps ( func ) def wrapper ( * args , ** kwargs ) : return method ( * args , ** kwargs ) return wrapper
generate a wrapper for calling a method .