parameters: (elem, default=None)
return_statement: return elem.get('type', default)
docstring: Get the type associated with an element, either a type child or type attribute.
docstring_summary: Get the type associated with an element, either a type child or type attribute.
docstring_tokens: Get the type associated with an element either a type child or type attribute .
function: def getElemType(elem, default=None):
      """Get the type associated with an element, either a type child or type attribute."""
      type_elem = elem.find('type')
      if type_elem is not None:
          return type_elem.text
      # Fallback if there is no child.
      return elem.get('type', default)
function_tokens: def getElemType ( elem , default = None ) : type_elem = elem . find ( 'type' ) if type_elem is not None : return type_elem . text # Fallback if there is no child. return elem . get ( 'type' , default )