Conversion to mlr3pipelines GraphSource:
The argument is turned into a
Graph if possible.
TRUE, a deep copy is made
if the incoming object is a
Graph to ensure the resulting
object is a different reference from the incoming object.
as_graph() is an S3 method and can therefore be implemented
by other packages that may add objects that can naturally be converted to
as_graph() tries to
Object to convert.
Whether to return a (deep copied) clone if
xis a Graph.
x or a deep clone of it.