def METHOD_NAME(statements):
  """Import a function by exec.
  Args:
      statements: Python statements
  Returns:
      Function-wrapped value of `f`.
  Raises:
      ValueError: the statements didn't define a value for "f"
  """
  environ = {}
  exec_(statements, environ)
  if "f" not in environ:
    raise ValueError("failed to define \"f\": %s", statements)
  f = environ["f"]
  return Function(f)