import json


def get_model_class(model_path):
    """Extract class from a model saved in model_path"""
    with open(model_path+'/stages/part-00000') as json_file:
        java_class = json.load(json_file)['class']
        pyth_class = java_class.split('.')[-1]
    return java_class,pyth_class