code: def decompose_type(tp):
      
      if isinstance(tp, cpptypes.compound_t):
          return [tp] + decompose_type(tp.base)
      elif isinstance(tp, typedef.typedef_t):
          return decompose_type(tp.decl_type)
      elif isinstance(tp, cpptypes.declarated_t) and \
              isinstance(tp.declaration, typedef.typedef_t):
          return decompose_type(tp.declaration.decl_type)
  
      return [tp]
docs: Implementation detail