func RandomPoll(r *rand.Rand) *types.Poll {
	shouldBeNil := r.Intn(100) < 50
	if shouldBeNil {
		return nil
	}
	answersLen := r.Intn(10) + 2  
	answers := make(types.ProvidedAnswers, answersLen)
	for i := 0; i < answersLen; i++ {
		answers[i] = types.NewProvidedAnswer(fmt.Sprint(i), RandomMessage(r))
	}
	return types.NewPoll(
		RandomMessage(r),
		RandomDate(r),
		answers,
		r.Intn(100) > 50,  
		r.Intn(100) > 50,  
	)
}
RandomPoll returns a randomly generated poll
package simulation
import (
	"crypto/sha256"
	"encoding/hex"
	"fmt"
	"math/rand"
	"strconv"
	"strings"
	"time"
	simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
	sdk "github.com/cosmos/cosmos-sdk/types"
	emoji "github.com/desmos-labs/Go-Emoji-Utils"
	"github.com/desmos-labs/desmos/v2/x/staging/posts/types"
	subspacesims "github.com/desmos-labs/desmos/v2/x/staging/subspaces/simulation"
)
var (
	randomMessages = []string{
		"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
		"Vestibulum a nulla sed purus pellentesque euismod quis ut risus.",
		"Morbi nec magna interdum, rhoncus nisl ac, posuere sapien.",
		"Duis vitae nisi efficitur, lobortis neque at, bibendum ipsum.",
		"Donec semper nisi vel mollis cursus.",
		"Curabitur quis massa id libero posuere venenatis ac ac erat.",
		"Morbi dictum elit vitae libero lobortis luctus.",
		"Nam sit amet velit venenatis est scelerisque egestas vitae nec turpis.",
		"Duis commodo sapien id ligula volutpat tincidunt in et est.",
		"Cras et magna cursus, volutpat purus at, dictum diam.",
		"Phasellus in arcu euismod, accumsan urna quis, consectetur enim.",
		"Morbi tincidunt urna sit amet vulputate bibendum.",
		"Etiam vehicula eros vel libero sollicitudin elementum.",
		"Pellentesque at nunc ac orci consequat varius.",
		"Donec aliquam libero eu purus cursus, in congue magna tempor.",
		"Vivamus a dolor scelerisque, posuere justo quis, pharetra nibh.",
	}
	reportsMessages = []string{
		"it's a trap",
		"it's an offense",
		"it's scam",
		"it'' racism",
	}
	reportTypes = []string{
		"nudity",
		"violence",
		"intimidation",
		"suicide or self-harm",
		"fake news",
		"spam",
		"unauthorized sale",
		"hatred incitement",
		"promotion of drug use",
		"non-consensual intimate images",
		"pornography",
		"children abuse",
		"animals abuse",
		"bullying",
		"scam",
	}
)
func RandomPost(r *rand.Rand, posts []types.Post) (types.Post, int) {
	idx := r.Intn(len(posts))
	return posts[idx], idx
}
type PostData struct {
	types.Post
	CreatorAccount simtypes.Account
}
func RandomPostData(r *rand.Rand, accs []simtypes.Account) PostData {
	simAccount, _ := simtypes.RandomAcc(r, accs)
	post := types.NewPost(
		"",
		RandomPostID(r),
		RandomMessage(r),
		RandomCommentsState(r),  
		RandomSubspace(r),
		nil,
		RandomAttachments(r, accs),
		RandomPoll(r),
		time.Time{},
		RandomDate(r),
		simAccount.Address.String(),
	)
	bytes, _ := post.Marshal()
	hash := sha256.Sum256(bytes)
	post.PostID = hex.EncodeToString(hash[:])
	return PostData{
		Post:           post,
		CreatorAccount: simAccount,
	}
}
type PostReactionData struct {
	Shortcode string
	Value     string
	User      simtypes.Account
	PostID    string
}
func RandomPostReactionData(
	r *rand.Rand, accs []simtypes.Account, postID string, shortCode, value string,
) PostReactionData {
	return PostReactionData{
		Shortcode: shortCode,
		Value:     value,
		User:      accs[r.Intn(len(accs))],
		PostID:    postID,
	}
}
func RandomPostID(r *rand.Rand) string {
	randBytes := make([]byte, 4)
	_, err := r.Read(randBytes)
	if err != nil {
		panic(err)
	}
	hash := sha256.Sum256(randBytes)
	return hex.EncodeToString(hash[:])
}
func RandomPostIDFromPosts(r *rand.Rand, posts []types.Post) string {
	p, _ := RandomPost(r, posts)
	return p.PostID
}
func RandomMessage(r *rand.Rand) string {
	idx := r.Intn(len(randomMessages))
	return randomMessages[idx]
}
func RandomSubspace(r *rand.Rand) string {
	return subspacesims.RandomSubspaceID(r)
}
func RandomDate(r *rand.Rand) time.Time {
	min := time.Date(1970, 1, 0, 0, 0, 0, 0, time.UTC).Unix()
	max := time.Date(2010, 1, 0, 0, 0, 0, 0, time.UTC).Unix()
	delta := max - min
	sec := r.Int63n(delta) + min
	return time.Unix(sec, 0).Truncate(time.Millisecond)
}
func RandomAttachments(r *rand.Rand, accs []simtypes.Account) types.Attachments {
	attNumber := r.Intn(20)
	tagsLen := r.Intn(50)
	tags := make([]string, tagsLen)
	for i := 0; i < tagsLen; i++ {
		acc, _ := simtypes.RandomAcc(r, accs)
		tags[i] = acc.Address.String()
	}
	postAttachments := make(types.Attachments, attNumber)
	for i := 0; i < attNumber; i++ {
		host := RandomHosts[r.Intn(len(RandomHosts))]
		mimeType := RandomMimeTypes[r.Intn(len(RandomMimeTypes))]
		postAttachments[i] = types.NewAttachment(host+strconv.Itoa(i), mimeType, tags)
	}
	return postAttachments
}