docstr: Get the python object set in the union.
docstr_tok: ["Get","the","python","object","set","in","the","union","."]
code: def get_py_obj(self):
      """
      Get the python object set in the union.
      """
      attrs = [
          a
          for a in dir(self.union)
          if not (a.startswith("_")) and a not in self.non_attrs
      ]
  
      # Much like a C union, only one field will be set. Return the first
      # non-None value encountered.
      for a in attrs:
          val = getattr(self.union, a)
          if val is not None:
              return val
  
      return None
  
file_path: cugraph/python/cugraph-service/client/cugraph_service_client/types.py
imports: from cugraph_service_client.cugraph_service_thrift import spec
label_desc: Use image node_id 2 for calling the GraphVertexEdgeIDWrapper obj's underlying member method code with example usage: obj.get_py_obj() and returns: None, val