generic/py-backend/helpers/exec_fn.py
def exec_fn(func):
    """Executes given function, returns {error,result} dict"""
    try:
        return {'result': func()}
    except Exception as error: # pylint: disable=broad-except
        return {'error': str(error)}
Executes given function, returns {error,result} dict
Executes given function, returns {error,result} dict
Executes given function returns { error result } dict
def exec_fn(func):
    try:
        return {'result': func()}
    except Exception as error: 
        return {'error': str(error)}
def exec_fn ( func ) : try : return { 'result' : func ( ) } except Exception as error : return { 'error' : str ( error ) }
Executes given function, returns {error,result} dict
Executes given function returns { error result } dict
"""Executes given function, returns {error,result} dict""" # pylint: disable=broad-except
func