Custom Network Discovery - UDP Broadcast

Hi,
I’m struggling to find the right way to implement a custom network discovery method that uses UDP broadcasts.

Should the discovery process for something like this be in the external Python library?
How does this kind of discovery process connect with my config flow?
Is there a good example integration that does a similar thing that I could mimic?

Best regard!