code: def gen_set(self):
      out = """
  // {shortname} setters
  """.format(
          **self.__dict__
      )
      for set_param in self.prototypes["set"]:
          params = get_params_types_names(set_param)[1:]
          param = self.shortname.split("_set_")[-1]
          paramdecls = "".join(
              [
                  """
     {0} {1};""".format(
                      p["type"], p["name"]
                  )
                  for p in params
              ]
          )
          method_name = get_name(set_param)
          param = method_name.split(
              "aubio_" + self.shortname + "_set_"
          )[-1]
          refs = ", ".join(["&%s" % p["name"] for p in params])
          paramlist = ", ".join(["%s" % p["name"] for p in params])
          if len(params):
              paramlist = "," + paramlist
          pyparamtypes = "".join(
              [pyargparse_chars[p["type"]] for p in params]
          )
          out += """
  static PyObject *
  Pyaubio_{shortname}_set_{param} (Py_{shortname} *self, PyObject *args)
  {{
    uint_t err = 0;
    {paramdecls}
  """.format(
              param=param, paramdecls=paramdecls, **self.__dict__
          )
  
          if len(refs) and len(pyparamtypes):
              out += """
  
    if (!PyArg_ParseTuple (args, "{pyparamtypes}", {refs})) {{
      return NULL;
    }}
  """.format(
                  pyparamtypes=pyparamtypes, refs=refs
              )
  
          out += """
    err = aubio_{shortname}_set_{param} (self->o {paramlist});
  
    if (err > 0) {{
      if (PyErr_Occurred() == NULL) {{
        PyErr_SetString (PyExc_ValueError, "error running aubio_{shortname}_set_{param}");
      }} else {{
        // change the RuntimeError into ValueError
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        Py_XDECREF(type);
        type = PyExc_ValueError;
        Py_XINCREF(type);
        PyErr_Restore(type, value, traceback);
      }}
      return NULL;
    }}
    Py_RETURN_NONE;
  }}
  """.format(
              param=param,
              refs=refs,
              paramdecls=paramdecls,
              pyparamtypes=pyparamtypes,
              paramlist=paramlist,
              **self.__dict__,
          )
      return out
  
label_desc: Use image node_id 14 for calling the MappedObject obj's underlying member method code with example usage: obj.gen_set() and returns: out