code: def test_cohere_embedding_operator(cohere_client, get_connection):
      """
      Test Cohere client is getting called with the correct key and that
       the execute methods returns expected response.
      """
      embedded_obj = [1, 2, 3]
  
      class resp:
          embeddings = embedded_obj
  
      api_key = "test"
      api_url = "http://some_host.com"
      timeout = 150
      max_retries = 5
      texts = [
          "On Kernel-Target Alignment. We describe a family of global optimization procedures"
      ]
  
      get_connection.return_value = Connection(
          conn_type="cohere", password=api_key, host=api_url
      )
      client_obj = MagicMock()
      cohere_client.return_value = client_obj
      client_obj.embed.return_value = resp
  
      op = CohereEmbeddingOperator(
          task_id="embed",
          conn_id="some_conn",
          input_text=texts,
          timeout=timeout,
          max_retries=max_retries,
      )
  
      val = op.execute(context={})
      cohere_client.assert_called_once_with(
          api_key=api_key,
          api_url=api_url,
          timeout=timeout,
          max_retries=max_retries,
      )
      assert val == embedded_obj
  
imports: from __future__ import annotations
  from unittest.mock import MagicMock, patch
  from airflow.models import Connection
  from airflow.providers.cohere.operators.embedding import CohereEmbeddingOperator
label_desc: Use image node_id 1 for calling a global function with example usage: test_cohere_embedding_operator(cohere_client, get_connection) without return types