Databricks interview question

Giving N graphs, write a function that merges N graphs randomly