code: func (b *DynamoDBBackend) collectActiveShards(ctx context.Context, streamArn *string) ([]*dynamodbstreams.Shard, error) {
  	var out []*dynamodbstreams.Shard
  
  	input := &dynamodbstreams.DescribeStreamInput{
  		StreamArn: streamArn,
  	}
  	for {
  		streamInfo, err := b.streams.DescribeStreamWithContext(ctx, input)
  		if err != nil {
  			return nil, convertError(err)
  		}
  		out = append(out, streamInfo.StreamDescription.Shards...)
  		if streamInfo.StreamDescription.LastEvaluatedShardId == nil {
  			return filterActiveShards(out), nil
  		}
  		input.ExclusiveStartShardId = streamInfo.StreamDescription.LastEvaluatedShardId
  	}
  }
docs: // collectActiveShards collects shards