Send metadata in WebRTC - Python

I am new to Gstreamer. My application requires sending metadata along with video frames over WebRTC from sender to receiver. I have developed the sendonly and recvonly pipelines in python, but I haven’t found an easy way to transfer metadata.

Also, I discovered that GstVideo SEI Unregistered User Data might be the way to do it, since I am using H265 (hardware version nvh265enc/dec). I found this thread Associating additional data with a frame - webrtc, which suggests to use a pad before the encoder in C.

Can someone please suggest how I can achieve the same in Python? What should the sender and receiver code look like?