private IDiagramGraph GetGraph(ModelRelationshipStereotype stereotype)
        {
            var transitivityPartitionKey = _modelRelationshipFeatureProvider.GetTransitivityPartitionKey(stereotype);

            _diagramGraphsByRelationshipTransitivityGroup.TryGetValue(transitivityPartitionKey, out var graph);
            return(graph ?? DiagramGraph.Empty());
        }
 private static IDictionary <string, IDiagramGraph> CreateDiagramGraphsByRelationshipTransitivityGroup(
     [NotNull] IModelRelationshipFeatureProvider modelRelationshipFeatureProvider,
     [NotNull][ItemNotNull] IImmutableSet <IDiagramNode> nodes,
     [NotNull][ItemNotNull] IImmutableSet <IDiagramConnector> connectors)
 {
     return(connectors.GroupBy(i => modelRelationshipFeatureProvider.GetTransitivityPartitionKey(i.ModelRelationship.Stereotype))
            .ToDictionary(i => i.Key, i => DiagramGraph.Create(nodes, i.ToImmutableHashSet())));
 }