code: def test_time_dependent_prob_multitask_sampler_variable_p():
      sampler = task_sampler.TimeDependentProbMultiTaskSampler(
          task_dict={
              "rte": None,
              "mnli": None,
              "squad_v1": None,
          },
          rng=0,
          task_to_unnormalized_prob_funcs_dict={
              "rte": "1",
              "mnli": "1 - t/1000",
              "squad_v1": "exp(t/1000)",
          },
      )
      assert np.array_equal(sampler.get_task_p(0), np.ones(3) / 3)
      assert np.allclose(
          sampler.get_task_p(500),
          np.array([0.31758924, 0.15879462, 0.52361614]),
      )
      assert np.allclose(
          sampler.get_task_p(999),
          np.array([2.69065663e-01, 2.69065663e-04, 7.30665271e-01]),
      )
  
imports: import numpy
  import pytest
  import jiant.proj.main.components.task_sampler
label_desc: Use image node_id 2 for calling a global function with example usage: test_time_dependent_prob_multitask_sampler_variable_p() without return types