def METHOD_NAME(cls, code):
    pieces = code.split('-')
    try:
        country_code = pieces[1]
    except IndexError:
        country_code = None
    try:
        province_code = pieces[2]
    except IndexError:
        province_code = None
    return {
        'continent_code': pieces[0],
        'country_code': country_code,
        'province_code': province_code,
    }