replace (dict) – Dictionary describing which subgraphs should be replaced by what.

share_inputs (bool) – If True, use the same inputs (and shared variables) as the original
graph. If False, clone them. Note that cloned shared variables still
use the same underlying storage, so they will always have the same
value.