code: def test_handle_partial_mixed_function(
      x, weight, expected, backend_fw
  ):
      ivy.set_backend(backend_fw)
      test_fn = "torch.nn.functional.linear"
      if ivy.current_backend_str() != "torch":
          # ivy.matmul is used inside the compositional implementation
          test_fn = "ivy.matmul"
          expected = True
      with patch(test_fn) as test_mock_function:
          ivy.linear(ivy.array(x), ivy.array(weight))
          assert test_mock_function.called == expected
      ivy.previous_backend()
  
imports: import numpy
  import ivy
  import pytest
  from unittest.mock import patch
  from ivy.func_wrapper import handle_array_like_without_promotion
  from typing import Union, Tuple, List, Sequence
label_desc: Use image node_id 12 for calling a global function with example usage: test_handle_partial_mixed_function(x, weight, expected, backend_fw) without return types