def METHOD_NAME(self, name, scope, dependent_names):
    buff = StringIO()
    code = CodeFormatter(buff)
    code.writeln(
        'def {}(this, {}):'.format(name, ', '.join(dependent_names)))
    with code.indented():
        for dependent_name in dependent_names:
            code.writeln(
                'tree.check_value({0!r}, {0})'.format(dependent_name))
        code.writeln('@this.add_cleanup')
        code.writeln('def cleanup():')
        with code.indented():
            code.writeln('tree.cleanup({!r})'.format(name))
        code.writeln('return tree.make_value({!r})'.format(name))
    globs = {'tree': self}
    exec(buff.getvalue(), globs)  # pylint: disable=exec-used
    return slash.fixture(scope=scope)(globs[name])