def METHOD_NAME(config, base, ignore, gsparams, logger):
    """Build a ChromaticRealGalaxy from several real_catalog input items.
    """
    param_name = 'ChromaticRealGalaxy'
    ncats = GetNumInputObj('real_catalog', base)
    real_cats = [ GetInputObj('real_catalog', config, base, param_name, n)
                  for n in range(ncats)]
    # Special: if index is Sequence or Random, and max isn't set, set it to nobjects-1.
    # But not if they specify 'id' or have 'random=True', which overrides that.
    if 'id' not in config:
        if 'random' not in config:
            SetDefaultIndex(config, real_cats[0].nobjects)
        else:
            if not config['random']:
                SetDefaultIndex(config, real_cats[0].nobjects)
                # Need to do this to avoid being caught by the GetAllParams() call, which will flag
                # it if it has 'index' and 'random' set (but 'random' is False, so really it's OK).
                del config['random']
    req, opt, single, _ = get_cls_params(ChromaticRealGalaxy)
    kwargs, safe = GetAllParams(config, base, req, opt, single, ignore)
    if gsparams: kwargs['gsparams'] = GSParams(**gsparams)
    kwargs['rng'] = GetRNG(config, base, logger, param_name)
    if 'index' in kwargs:
        index = kwargs['index']
        if index >= real_cats[0].nobjects or index < 0:
            raise GalSimConfigError(
                "index=%s has gone past the number of entries in the RealGalaxyCatalog"%index)
    kwargs['real_galaxy_catalogs'] = real_cats
    logger.debug('obj %d: %s kwargs = %s',base.get('obj_num',0),param_name,kwargs)
    gal = ChromaticRealGalaxy(**kwargs)
    return gal, safe