code: public static <V, E> DirectedGraph<V, E> synchronize( final DirectedGraph<V, E> graph )
      {
          return new SynchronizedDirectedGraph<V, E>( graph );
      }
docs: Returns a synchronized (thread-safe) {@link DirectedGraph} backed by the specified Graph.
  
  It is imperative that the user manually synchronize on the returned graph when iterating over iterable collections:
  <pre>
  Graph syncGraph = synchronize( graph );
  ...
  synchronized(syncGraph) {
  for ( Vertex v : g.getVertices() ) // Must be in synchronized block
  {
  foo( v )
  }
  }
  </pre>
  
  Failure to follow this advice may result in non-deterministic behavior.
  
  The returned {@link Graph} will be serializable if the specified {@link Graph} is serializable.
  
  @param <V> the Graph vertices type
  @param <E> the Graph edges type
  @param graph the input {@link Graph}
  @return the syncronyzed graph