def METHOD_NAME(config, base, value_type):
    """Return a magnification calculated from an NFWHalo object.
    """
    nfw_halo = GetInputObj('nfw_halo', config, base, 'NFWHaloMagnification')
    logger = nfw_halo.logger
    if 'uv_pos' not in base:
        raise GalSimConfigError("NFWHaloMagnification requested, but no position defined.")
    pos = base['uv_pos']
    if 'gal' not in base or 'redshift' not in base['gal']:
        raise GalSimConfigError("NFWHaloMagnification requested, but no gal.redshift defined.")
    redshift = GetCurrentValue('redshift', base['gal'], float, base)
    opt = { 'max_mu' : float, 'num' : int }
    kwargs = GetAllParams(config, base, opt=opt)[0]
    max_mu = kwargs.get('max_mu', 25.)
    if not max_mu > 0.:
        raise GalSimConfigValueError(
            "Invalid max_mu for type = NFWHaloMagnification (must be > 0)", max_mu)
    mu = nfw_halo.getMagnification(pos,redshift)
    if mu < 0 or mu > max_mu:
        logger.warning('obj %d: Warning: NFWHalo mu = %f means strong lensing. '%(
                       base['obj_num'],mu) + 'Using mu = %f'%max_mu)
        mu = max_mu
    logger.debug('obj %d: NFWHalo mu = %s',base['obj_num'],mu)
    return mu, False