def METHOD_NAME(_ftype, _box, _var_window):
    def _change_field(event):
        fobj = getattr(_ftype, event["new"])
        _box.clear_output()
        with _box:
            display(
                Markdown(
                    data="```python\n"
                    + textwrap.dedent(fobj.get_source())
                    + "\n```"
                )
            )
        values = inspect.getclosurevars(fobj._function).nonlocals
        _var_window.value = _fill_values(values)
    return _change_field