def METHOD_NAME(self):
    """
    Run genpybind on the headers provided in `source` and compile/link the
    generated code instead.  This works by generating the code on the fly and
    swapping the source node before `process_source` is run.
    """
    # name of module defaults to name of target
    module = getattr(self, "module", self.target)
    # create temporary source file in build directory to hold generated code
    out = "genpybind-%s.%d.cpp" % (module, self.idx)
    out = self.path.get_bld().find_or_declare(out)
    task = self.create_task("genpybind", self.to_nodes(self.source), out)
    # used to detect whether CFLAGS or CXXFLAGS should be passed to genpybind
    task.features = self.features
    task.module = module
    # can be used to select definitions to include in the current module
    # (when header files are shared by more than one module)
    task.genpybind_tags = self.to_list(getattr(self, "genpybind_tags", []))
    # additional include directories
    task.includes = self.to_list(getattr(self, "includes", []))
    task.genpybind = self.env.GENPYBIND
    # Tell waf to compile/link the generated code instead of the headers
    # originally passed-in via the `source` parameter. (see `process_source`)
    self.source = [out]