<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nside2pixarea(nside, degrees=False):
 """Drop-in replacement for healpy `~healpy.pixelfunc.nside2pixarea`."""

    area = nside_to_pixel_area(nside)
    if degrees:
        return area.to(u.deg ** 2).value
    else:
        return area.to(u.sr).value