def get_shard_for_key(self, partition_key, explicit_hash_key):
        if not isinstance(partition_key, six.string_types):
            raise InvalidArgumentError("partition_key")
        if len(partition_key) > 256:
            raise InvalidArgumentError("partition_key")

        if explicit_hash_key:
            if not isinstance(explicit_hash_key, six.string_types):
                raise InvalidArgumentError("explicit_hash_key")

            key = int(explicit_hash_key)

            if key >= 2**128:
                raise InvalidArgumentError("explicit_hash_key")

        else:
            key = int(md5(partition_key.encode('utf-8')).hexdigest(), 16)

        for shard in self.shards.values():
            if shard.starting_hash <= shard.ending_hash < key:
                return shard
dataset/ETHPy150Open spulec/moto/moto/kinesis/models.py/Stream.get_shard_for_key/swapped operands of `<`