import re


def explode_ltr_model_definition(definition):
    """
    Parse a string describing a ltr featureset or model
    (featureset|model):name[@storename]

    Parameters
    ----------
    definition: string
        the model/featureset definition

    Returns
    -------
        list: 3 elements list: type, name, store
    """
    res = re.search('(featureset|model)+:([^@]+)(?:[@](.+))?$', definition)
    if res is None:
        raise ValueError("Cannot parse ltr model definition [%s]." % (definition))
    return res.groups()