public function shardIdIn(int $uuid, bool $validate = true): int
    {
        $shard_id = ($uuid >> (64 - 2 - 16)) & 65535;

        if ($validate) {
            $this->validateShardId($shard_id);
        }
        return $shard_id;
    }