code: def count_philox_rand(gm, args, freq):
      assert [node.target for node in gm.graph.nodes].count(
          torch.ops.rngprims.philox_rand.default
      ) == freq
      return gm
  
imports: import sys
  import unittest
  import torch
  from torch.testing._internal.common_utils import TestCase, run_tests
  from torch.testing._internal.common_device_type import instantiate_device_type_tests, dtypes
  from functorch.compile import aot_function, nop, min_cut_rematerialization_partition
  from unittest.mock import patch
  import functools
  import torch.utils.checkpoint
  from torch.testing._internal.common_utils import IS_CI, IS_WINDOWS
label_desc: Use image node_id 1 for calling a global function with example usage: count_philox_rand(gm, args, freq) and returns: gm