code: def accepts(*types):
      """Decorator to ensure that the decorated function accepts the given types as arguments.
  
      Example:
          @accepts(int, (int,float))
          @returns((int,float))
          def func(arg1, arg2):
              return arg1 * arg2
      """
  
      def check_accepts(f):
          assert len(types) == f.__code__.co_argcount
  
          def new_f(*args, **kwds):
              for a, t in zip(args, types):
                  assert isinstance(
                      a, t
                  ), "arg %r does not match %s" % (a, t)
              return f(*args, **kwds)
  
          new_f.__name__ = f.__name__
          return new_f
  
      return check_accepts
  
file_path: wandb/wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/decorators.py
imports: import functools
  import warnings
  import threading
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: accepts() and returns: check_accepts, new_f, f