def bias(mass, z, h=h, Om_M=Om_M, Om_L=Om_L):
M_nl_0 = (<NUM_LIT> / h) * (<NUM_LIT> ** <NUM_LIT>)         <EOL>M_nl = M_nl_0 * (Om_M + Om_L / ((<NUM_LIT:1.> + z) ** <NUM_LIT>))  <EOL>x = mass / M_nl<EOL>b = <NUM_LIT> + <NUM_LIT> * (x ** <NUM_LIT>) + <NUM_LIT> / (<NUM_LIT> * x +<EOL><NUM_LIT:1.>) + (<NUM_LIT>) * (x ** <NUM_LIT>)<EOL>return b<EOL>
Calculate halo bias, from Seljak & Warren 2004.

    Parameters
    ----------
    mass : ndarray or float
        Halo mass to calculate bias for.
    z : ndarray or float
        Halo z, same type and size as mass.
    h : float, optional
        Hubble parameter, defaults to astropy.cosmology.Planck13.h
    Om_M : float, optional
        Fractional matter density, defaults to
        astropy.cosmology.Planck13.Om0
    Om_L : float, optional
        Fractional dark energy density, defaults to 1-Om_M.

    Returns
    ----------
    ndarray or float
        Returns the halo bias, of same type and size as input mass_halo and
        z_halo. Calculated according to Seljak & Warren 2004 for z = 0.
        For halo z > 0, the non-linear mass is adjusted using the input
        cosmological parameters.

    References
    ----------
    Based on fitting formula derived from simulations in:

    U. Seljak and M.S. Warren, "Large-scale bias and stochasticity of
    haloes and dark matter," Monthly Notices of the Royal Astronomical
    Society, Volume 355, Issue 1, pp. 129-136 (2004).