<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetTypeManager(self):
 """ Get dynamic type manager """

      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