code: def mock_patch_return_object(
      attribute: str, return_value: Any
  ) -> object:
      class Obj:
          pass
  
      obj = Obj()
      obj.__setattr__(
          attribute, mock.MagicMock(return_value=return_value)
      )
      return obj
  
imports: from __future__ import annotations
  from typing import Any
  from unittest import mock
  import pytest
  from google.api_core.gapic_v1.method import DEFAULT
  from google.cloud.tasks_v2.types import Queue, Task
  from airflow.providers.google.cloud.hooks.tasks import CloudTasksHook
  from airflow.providers.google.common.consts import CLIENT_INFO
  from tests.providers.google.cloud.utils.base_gcp_mock import mock_base_gcp_hook_no_default_project_id
label_desc: Use image node_id 1 for calling a global function with example usage: mock_patch_return_object(attribute, return_value) and returns: obj