Whats this do?

This morning I had the tank off my 1995 carburetor California 1100 to replace the cylinder head oil feed pipes after a small ecological disaster on the weekend. While it was off I had check of the cables’ pipes wires etc.There’s is a white plastic conector with a single terminal swinging in the breeze I couldn’t find anything obvious to connect it to. From the condition of the terminal it had not been connected to anything for a good while. Anyone have any ideas what it may be. The bike runs fine and all the electrical bits work ok.

Hi possibly fuel gauge sensor. Tom.