Factoring out a utility method.
Adding go unit tests for ShardExternallyReparented