code: def GetTypeManager(self):
        
        dynTypeMgr = None
        if self.hostSystem:
           try:
              dynTypeMgr = self.hostSystem.RetrieveDynamicTypeManager()
           except vmodl.fault.MethodNotFound as err:
              pass
  
        if not dynTypeMgr:
           # Older host not support RetrieveDynamicTypeManager
           cmdlineTypesMoId = "ha-dynamic-type-manager"
           dynTypeMgr = vmodl.reflect.DynamicTypeManager(cmdlineTypesMoId,
                                                         self.stub)
        return dynTypeMgr
docs: Get dynamic type manager