code: def ignore_jit_warnings(filter=None):
      """
      Ignore JIT tracer warnings with messages that match `filter`. If
      `filter` is not specified all tracer warnings are ignored.
  
      Note this only installs warning filters if executed within traced code.
  
      :param filter: A list containing either warning message (str),
          or tuple consisting of (warning message (str), Warning class).
      """
      if not torch._C._get_tracing_state():
          yield
          return
  
      with warnings.catch_warnings():
          if filter is None:
              warnings.filterwarnings(
                  "ignore", category=torch.jit.TracerWarning
              )
          else:
              for msg in filter:
                  category = torch.jit.TracerWarning
                  if isinstance(msg, tuple):
                      msg, category = msg
                  warnings.filterwarnings(
                      "ignore", category=category, message=msg
                  )
          yield
  
imports: import functools
  import math
  import numbers
  import random
  import sys
  import timeit
  import warnings
  from collections import defaultdict
  from contextlib import contextmanager
  from itertools import zip_longest
  import numpy
  import torch
  from pyro.poutine.util import site_is_subsample
label_desc: Use image node_id 15 for calling a global function with example usage: ignore_jit_warnings(filter) without return types