def extract_id(urn):
    """Extract id from an urn.

    'urn:vcloud:catalog:39867ab4-04e0-4b13-b468-08abcc1de810' will produce
    '39867ab4-04e0-4b13-b468-08abcc1de810'

    :param str urn: a vcloud resource urn.

    :return: the extracted id

    :rtype: str
    """
    if urn is None:
        return None
    if ':' in urn:
        return urn.split(':')[-1]
    else:
        return urn