code: def gen_code(self):
      out = ""
      try:
          out += self.gen_struct()
          out += self.gen_doc()
          out += self.gen_new()
          out += self.gen_init()
          out += self.gen_del()
          out += self.gen_do()
          if len(self.prototypes["rdo"]):
              self.do_proto = self.prototypes["rdo"][0]
              self.do_inputs = [
                  get_params_types_names(self.do_proto)[1]
              ]
              self.do_outputs = get_params_types_names(self.do_proto)[
                  2:
              ]
              out += self.gen_do(method="rdo")
          out += self.gen_memberdef()
          out += self.gen_set()
          out += self.gen_get()
          out += self.gen_methodef()
          out += self.gen_typeobject()
      except Exception as e:
          print("Failed generating code for", self.shortname)
          raise
      return out
  
label_desc: Use image node_id 2 for calling the MappedObject obj's underlying member method code with example usage: obj.gen_code() and returns: out