def get_ichrone(models, bands=None, default=False, **kwargs):
if isinstance(models, Isochrone):<EOL><INDENT>return models<EOL><DEDENT>def actual(bands, ictype):<EOL><INDENT>if bands is None:<EOL><INDENT>return list(ictype.default_bands)<EOL><DEDENT>elif default:<EOL><INDENT>return list(set(bands).union(set(ictype.default_bands)))<EOL><DEDENT>else:<EOL><INDENT>return bands<EOL><DEDENT><DEDENT>if type(models) is type(type):<EOL><INDENT>ichrone = models(actual(bands, models))<EOL><DEDENT>elif models=='<STR_LIT>':<EOL><INDENT>from isochrones.dartmouth import Dartmouth_Isochrone<EOL>ichrone = Dartmouth_Isochrone(bands=actual(bands, Dartmouth_Isochrone), **kwargs)<EOL><DEDENT>elif models=='<STR_LIT>':<EOL><INDENT>from isochrones.dartmouth import Dartmouth_FastIsochrone<EOL>ichrone = Dartmouth_FastIsochrone(bands=actual(bands, Dartmouth_FastIsochrone), **kwargs)<EOL><DEDENT>elif models=='<STR_LIT>':<EOL><INDENT>from isochrones.mist import MIST_Isochrone<EOL>ichrone = MIST_Isochrone(bands=actual(bands, MIST_Isochrone), **kwargs)<EOL><DEDENT>elif models=='<STR_LIT>':<EOL><INDENT>from isochrones.padova import Padova_Isochrone<EOL>ichrone = Padova_Isochrone(bands=actual(bands, Padova_Isochrone), **kwargs)<EOL><DEDENT>elif models=='<STR_LIT>':<EOL><INDENT>from isochrones.basti import Basti_Isochrone<EOL>ichrone = Basti_Isochrone(bands=actual(bands, Basti_Isochrone), **kwargs)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(models))<EOL><DEDENT>return ichrone<EOL>
Gets Isochrone Object by name, or type, with the right bands

    If `default` is `True`, then will set bands
    to be the union of bands and default_bands