code: def _hashable_args_kwargs(args, kwargs):
      items = sorted(kwargs.items())
      hashable_kwargs = tuple(
          (key, _hash(value, False)) for key, value in items
      )
      try:
          hash(hashable_kwargs)
      except TypeError:
          warnings.warn(
              "Failed to hash kwargs; attempting to hash by id."
          )
          hashable_kwargs = tuple(
              (key, _hash(value, True)) for key, value in items
          )
      return len(args), hashable_kwargs
  
file_path: pyro/pyro/ops/jit.py
imports: import argparse
  import warnings
  import weakref
  import torch
  import pyro
  import pyro.poutine
  from pyro.util import ignore_jit_warnings, optional, timed
label_desc: Use image node_id 2 for calling a global function with example usage: _hashable_args_kwargs(args, kwargs) and returns: len,  hashable_kwargs