def METHOD_NAME(aa_crepr, observed_frame):
    # add refraction to AltAz cartesian representation
    refa, refb = erfa.refco(
        observed_frame.pressure.to_value(u.hPa),
        observed_frame.temperature.to_value(u.deg_C),
        observed_frame.relative_humidity.value,
        observed_frame.obswl.to_value(u.micron),
    )
    # reference: erfa.atioq()
    norm, uv = erfa.pn(aa_crepr.get_xyz(xyz_axis=-1).to_value())
    # Cosine and sine of altitude, with precautions.
    sel = np.maximum(uv[..., 2], SELMIN)
    cel = np.maximum(np.sqrt(uv[..., 0] ** 2 + uv[..., 1] ** 2), CELMIN)
    # A*tan(z)+B*tan^3(z) model, with Newton-Raphson correction.
    tan_z = cel / sel
    w = refb * tan_z**2
    delta_el = (refa + w) * tan_z / (1.0 + (refa + 3.0 * w) / (sel**2))
    # Apply the change, giving observed vector
    cosdel = 1.0 - 0.5 * delta_el**2
    f = cosdel - delta_el * sel / cel
    uv[..., 0] *= f
    uv[..., 1] *= f
    uv[..., 2] = cosdel * uv[..., 2] + delta_el * cel
    # Need to renormalize to get agreement with CIRS->Observed on distance
    norm2, uv = erfa.pn(uv)
    uv = erfa.sxp(norm, uv)
    return CartesianRepresentation(uv, xyz_axis=-1, unit=aa_crepr.x.unit, copy=False)