code: def test_fraction_of_true():
      res = profile_fraction_of_true([], [])
      assert np.isnan(res)
      res = profile_fraction_of_true(["a"], [10])
      assert np.isnan(res)
      res = profile_fraction_of_true(["a", "b", "c"], [10, 10, 10])
      assert np.isnan(res)
  
      res = profile_fraction_of_true(
          np.array(["True", "False"]), np.array([0, 0])
      )
      assert np.isnan(res)
      res = profile_fraction_of_true(
          np.array(["True", "False"]), np.array([10, 10])
      )
      assert res == 0.5
      res = profile_fraction_of_true(np.array([True, False]), [10, 10])
      assert res == 0.5
  
      res = profile_fraction_of_true(np.array(["True"]), np.array([10]))
      assert res == 1.0
      res = profile_fraction_of_true(np.array([True]), np.array([10]))
      assert res == 1.0
      res = profile_fraction_of_true(
          np.array(["False"]), np.array([10])
      )
      assert res == 0.0
      res = profile_fraction_of_true(np.array([False]), np.array([10]))
      assert res == 0.0
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_fraction_of_true() without return types