from typing import List
import ast


def _ast_for_fiddler(func_name: str, param_name: str,
                     body: List[ast.AST]) -> ast.FunctionDef:
  """Returns an `ast.FunctionDef` for the fiddler function.

  Args:
    func_name: The name of the fiddler function.
    param_name: The name of the fiddler function's parameter.
    body: The body of the fiddler function.
  """
  return ast.FunctionDef(
      name=func_name,
      args=ast.arguments(
          args=[ast.arg(arg=param_name)],
          posonlyargs=[],
          kwonlyargs=[],
          kw_defaults=[],
          defaults=[]),
      body=body,
      decorator_list=[])