def core_helper(f, name=None):
 def _get_name(func_or_class):
  try:
   return func_or_class.__name__
  except AttributeError:
   return func_or_class.__class__.__name__
 _builtin_functions[(name or _get_name(f))] = f
 return f

def core_helper ( f , name = None ) : def _get_name ( func_or_class ) : try : return func_or_class . __name__ except AttributeError : return func_or_class . __class__ . __name__ _builtin_functions [ ( name or _get_name ( f ) ) ] = f return f
register a function as a builtin helper method .