code: def print_info(obj, info_cls):
      for info_name in sorted(dir(info_cls)):
          if not info_name.startswith("_") and info_name != "to_string":
              info = getattr(info_cls, info_name)
              try:
                  info_value = obj.get_info(info)
              except Exception:
                  info_value = "<error>"
  
              if (
                  info_cls == cl.device_info
                  and info_name == "PARTITION_TYPES_EXT"
                  and isinstance(info_value, list)
              ):
                  print(
                      "{}: {}".format(
                          info_name,
                          [
                              cl.device_partition_property_ext.to_string(
                                  v,
                                  "<unknown device partition property %d>",
                              )
                              for v in info_value
                          ],
                      )
                  )
              else:
                  try:
                      print(f"{info_name}: {info_value}")
                  except Exception:
                      print("%s: <error>" % info_name)
  
label_desc: Use image node_id 1 for calling a global function with example usage: print_info(obj, info_cls) without return types