There is a sample in C code (apps/sample_apps/deepstream-user-metadata-test), but it has no corresponding python version.
There is one example deepstream-test4 in python that uses user_metadata, you can check the corresponding part.
There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks