def udfize_def_string(code: str) -> str:
    """Given an unindented code block that uses 'input' as a parameter, and output as a
    return value, returns a function as a string."""
    return """\
def udf(input):
 {}
 return output
""".format(
        " ".join(line for line in code.splitlines(True))
    )