def mass_to_richness(mass, norm=<NUM_LIT>, slope=<NUM_LIT>):
richness = <NUM_LIT> * (mass / norm)**(<NUM_LIT:1.> / slope)<EOL>return richness<EOL>
Calculate richness from mass.

    Mass-richness relation assumed is:
    mass = norm * (richness / 20) ^ slope.

    Parameters
    ----------
    mass : ndarray or float
        Cluster mass value(s) in units of solar masses.
    norm : float, optional
        Normalization of mass-richness relation in units of solar masses,
        defaults to 2.7e13.
    slope : float, optional
        Slope of mass-richness relation in units of solar masses, defaults
        to 1.4.

    Returns
    ----------
    ndarray or float
        Cluster richness(es), of same type as mass.

    See Also
    ----------
    richness_to_mass : The inverse of this function.