def tagToKey(tag):
 keyAttr = tag.get('key')
 if keyAttr:
  if (tag.get('keytype') == 'int'):
   keyAttr = int(keyAttr)
  return keyAttr
 return tag.name

def tagToKey ( tag ) : keyAttr = tag . get ( 'key' ) if keyAttr : if ( tag . get ( 'keytype' ) == 'int' ) : keyAttr = int ( keyAttr ) return keyAttr return tag . name
return the name of the tag .