code: def gen_new(self):
      out = """
  // new {shortname}
  static PyObject *
  Py_{shortname}_new (PyTypeObject * pytype, PyObject * args, PyObject * kwds)
  {{
      Py_{shortname} *self;
  """.format(
          **self.__dict__
      )
      params = self.input_params
      for p in params:
          out += """
      {type} {name} = {defval};""".format(
              defval=param_init[p["type"]], **p
          )
      plist = ", ".join(['"%s"' % p["name"] for p in params])
      out += """
      static char *kwlist[] = {{ {plist}, NULL }};""".format(
          plist=plist
      )
      argchars = "".join([pyargparse_chars[p["type"]] for p in params])
      arglist = ", ".join(["&%s" % p["name"] for p in params])
      out += """
      if (!PyArg_ParseTupleAndKeywords (args, kwds, "|{argchars}", kwlist,
                {arglist})) {{
          return NULL;
      }}
  """.format(
          argchars=argchars, arglist=arglist
      )
      out += """
      self = (Py_{shortname} *) pytype->tp_alloc (pytype, 0);
      if (self == NULL) {{
          return NULL;
      }}
  """.format(
          **self.__dict__
      )
      params = self.input_params
      for p in params:
          out += self.check_valid(p)
      out += """
      return (PyObject *)self;
  }
  """
      return out
  
label_desc: Use image node_id 5 for calling the MappedObject obj's underlying member method code with example usage: obj.gen_new() and returns: out