code: def _generate_messages(count) -> list[ReceivedMessage]:
      return [
          ReceivedMessage(
              ack_id=str(i),
              message={
                  "data": f"Message {i}".encode(),
                  "attributes": {"type": "generated message"},
              },
          )
          for i in range(1, count + 1)
      ]
  
imports: from __future__ import annotations
  from unittest import mock
  from uuid import UUID
  import httplib2
  import pytest
  from google.api_core.exceptions import AlreadyExists, GoogleAPICallError
  from google.api_core.gapic_v1.method import DEFAULT
  from google.cloud.exceptions import NotFound
  from google.cloud.pubsub_v1.types import ReceivedMessage
  from googleapiclient.errors import HttpError
  from airflow.providers.google.cloud.hooks.pubsub import PubSubAsyncHook, PubSubException, PubSubHook
  from airflow.providers.google.common.consts import CLIENT_INFO
  from airflow.version import version
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_messages(count) and returns: unknown