Get user-friendly name for F-Curve

Hello! I’m trying to get the user-friendly name of an F-Curve that gets displayed in the Dope Sheet and Graph Editor. For example, I would like to get the name ‘X Euler Rotation’.

User-Friendly Channel Name

If I use FCurve.data_path, I just get rotation_euler (which isn’t describing the F-Curve’s X dimension).

visible = context.visible_fcurves[:]
for fcurve in visible:
    # rotation_euler

Can anyone guide me on how to get the F-Curve’s user-friendly name used in the user interface? If it isn’t possible, can I at least get the F-Curve’s dimension? Thank you!

It seems like this isn’t possible without creating a function using the F-Curve’s data_path and array_index attributes.