def METHOD_NAME(self, args):
    bld = self.generator.bld
    kwargs = dict(cwd=bld.variant_dir)
    if hasattr(bld, "log_command"):
        bld.log_command(args, kwargs)
    else:
        Logs.debug("runner: {!r}".format(args))
    proc = subprocess.Popen(
        args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
    stdout, stderr = proc.communicate()
    if not isinstance(stdout, str):
        stdout = stdout.decode(sys.stdout.encoding, errors="replace")
    if not isinstance(stderr, str):
        stderr = stderr.decode(sys.stderr.encoding, errors="replace")
    if proc.returncode != 0:
        bld.fatal(
            "genpybind returned {code} during the following call:"
            "\n{command}\n\n{stdout}\n\n{stderr}".format(
                code=proc.returncode,
                command=join_args(args),
                stdout=stdout,
                stderr=stderr,
            ))
    if stderr.strip():
        Logs.debug("non-fatal warnings during genpybind run:\n{}".format(stderr))
    return stdout