def goalify(func):
    def funco(inputs, out):
        if isvar(inputs):
            raise EarlyGoalError()
        else:
            if isinstance(inputs, (tuple, list)):
                return (eq, func(*inputs), out)
            else:
                return (eq, func(inputs), out)
    return funco
Convert Python function into LogPy goal
dataset/ETHPy150Open logpy/logpy/logpy/goals.py/goalify