def METHOD_NAME(self, cosmo, a):
    # First create the dictionary passed to baccoemu
    # if a is an array, make sure all the other parameters passed to the
    # emulator have the same len
    if hasattr(a, '__len__'):
        emupars = dict(
            omega_cold=np.full((len(a)),
                               cosmo['Omega_c'] + cosmo['Omega_b']),
            omega_baryon=np.full((len(a)), cosmo['Omega_b']),
            ns=np.full((len(a)), cosmo['n_s']),
            hubble=np.full((len(a)), cosmo['h']),
            neutrino_mass=np.full((len(a)), np.sum(cosmo['m_nu'])),
            w0=np.full((len(a)), cosmo['w0']),
            wa=np.full((len(a)), cosmo['wa']),
            expfactor=a
        )
    else:
        emupars = dict(
            omega_cold=cosmo['Omega_c'] + cosmo['Omega_b'],
            omega_baryon=cosmo['Omega_b'],
            ns=cosmo['n_s'],
            hubble=cosmo['h'],
            neutrino_mass=np.sum(cosmo['m_nu']),
            w0=cosmo['w0'],
            wa=cosmo['wa'],
            expfactor=a
        )
    # if cosmo contains sigma8, we use it for baccoemu, otherwise we pass
    # A_s to the emulator
    if np.isnan(cosmo['A_s']):
        sigma8tot = cosmo['sigma8']
        sigma8cold = self._sigma8tot_2_sigma8cold(emupars, sigma8tot)
        if hasattr(a, '__len__'):
            emupars['sigma8_cold'] = np.full((len(a)), sigma8cold)
        else:
            emupars['sigma8_cold'] = sigma8cold
    else:
        if hasattr(a, '__len__'):
            emupars['A_s'] = np.full((len(a)), cosmo['A_s'])
        else:
            emupars['A_s'] = cosmo['A_s']
    h = cosmo['h']
    k_hubble, pk_hubble = self.mpk.get_nonlinear_pk(cold=False, **emupars)
    return k_hubble * h, pk_hubble / h**3