'Return the value of the <presence> stanza\'s type attribute, or
the value of the <show> element.'

def get_type(self):

    out = self._get_attr('type')
    if (not out):
        out = self['show']
    if ((not out) or (out is None)):
        out = 'available'
    return out
