'Generate (and globally store) a rendering function definition AST
and return its name. The function takes parameters ``self``, ``append``,
``values``, ``options``, and ``log``. If ``body`` is empty, the function
simply returns ``None``.'

def _create_def(self, options, body, prefix='fn', lineno=None):

    name = self._make_name(prefix)
    fn = ast.FunctionDef(name=name, args=ast.arguments(args=[ast.Name(id='self', ctx=ast.Param()), ast.Name(id='append', ctx=ast.Param()), ast.Name(id='values', ctx=ast.Param()), ast.Name(id='options', ctx=ast.Param()), ast.Name(id='log', ctx=ast.Param())], defaults=[], vararg=None, kwarg=None), body=(body or [ast.Return()]), decorator_list=[])
    if (lineno is not None):
        fn.lineno = lineno
    options['ast_calls'].append(fn)
    return name
