Added function to convert shard_name to keyrange.