code: def test_retries(execute_mock):
      expected_retries = 3
      execute_mock.side_effect = Exception("fail")
  
      client = Client(
          retries=expected_retries,
          transport=RequestsHTTPTransport(
              url="http://swapi.graphene-python.org/graphql"
          ),
      )
  
      query = gql(
          """
      {
        myFavoriteFilm: film(id:"RmlsbToz") {
          id
          title
          episodeId
        }
      }
      """
      )
  
      with pytest.raises(Exception):
          client.execute(query)
  
      assert execute_mock.call_count == expected_retries
  
imports: import pytest
  import mock
  from gql import Client, gql
  from gql.transport.requests import RequestsHTTPTransport
label_desc: Use image node_id 1 for calling a global function with example usage: test_retries(execute_mock) without return types