Graph from motif distribution

Hello!

I am quite new to the graph theory field. I studied the Newman 2010 book and I am now trying to deepen my understanding on motifs.

I would like to create a graph given a (3vertices) motif distribution to then perform statistical comparisons with real networks.
How can I do it with igraph-python?

More in detail, I have a distribution of the ratios between actual motifs count and those found in (100) Erdös-Rényi surrogates networks having the same degree sequence of the actual network. I would like to use such ratio distribution to create a graph.

I know how to generate a network with given edge distribution
(Generating graphs for given degree sequence in Python or R - Stack Overflow).

And I found how to generate an edge distribution such that it yields a given motif distribution
(Generating networks with a desired second order motif frequency - Math Insight).
But this description is for 2 edges motifs distributions.

Thanks for any help!