'The function for parsing the vcard address.
Args:
val: The value to parse.'

def _parse_address(self, val):

    ret = {'type': None, 'value': None}
    try:
        ret['type'] = val[1]['type']
    except (KeyError, ValueError, TypeError):
        pass
    try:
        ret['value'] = val[1]['label']
    except (KeyError, ValueError, TypeError):
        ret['value'] = '\n'.join(val[3]).strip()
    try:
        self.vars['address'].append(ret)
    except AttributeError:
        self.vars['address'] = []
        self.vars['address'].append(ret)
