code: def get_info_for_reshard(stream_details):
      
      min_hash_key = 0
      max_hash_key = 0
      stream_details["OpenShards"] = []
      for shard in stream_details["Shards"]:
          shard_id = shard["ShardId"]
          if "EndingSequenceNumber" in shard["SequenceNumberRange"]:
              # EndingSequenceNumber is null for open shards, so this shard must be closed
              log.debug("skipping closed shard %s", shard_id)
              continue
          stream_details["OpenShards"].append(shard)
          shard["HashKeyRange"]["StartingHashKey"] = long_int(
              shard["HashKeyRange"]["StartingHashKey"])
          shard["HashKeyRange"]["EndingHashKey"] = long_int(
              shard["HashKeyRange"]["EndingHashKey"])
          if shard["HashKeyRange"]["StartingHashKey"] < min_hash_key:
              min_hash_key = shard["HashKeyRange"]["StartingHashKey"]
          if shard["HashKeyRange"]["EndingHashKey"] > max_hash_key:
              max_hash_key = shard["HashKeyRange"]["EndingHashKey"]
      stream_details["OpenShards"].sort(key=lambda shard: long_int(
          shard["HashKeyRange"]["StartingHashKey"]))
      return min_hash_key, max_hash_key, stream_details
docs: Collect some data: number of open shards, key range, etc.
      Modifies stream_details to add a sorted list of OpenShards.
      Returns (min_hash_key, max_hash_key, stream_details)
  
      CLI example::
  
          salt myminion boto_kinesis.get_info_for_reshard existing_stream_details