code: def InitFromObj(cls, nestedUnionTest):
      x = NestedUnionTestT()
      x._UnPack(nestedUnionTest)
      return x
  
imports: import flatbuffers
  from flatbuffers.compat import import_numpy
  from typing import Any
  from flatbuffers.table import Table
  from typing import Optional
  import MyGame.Example.NestedUnion.Any
  import MyGame.Example.NestedUnion.TestSimpleTableWithEnum
  import MyGame.Example.NestedUnion.Vec3
label_desc: Use image node_id 4 for calling the NestedUnionTestT obj's underlying member method code with example usage: obj.InitFromObj(cls, nestedUnionTest) and returns: x