code: def _get_defaultkwargs(func):
      """Returns a dictionary containing all of the input function's arguments with default values."""
      argspec = getfullargspec(func)
  
      arguments = argspec.args
      defaults = argspec.defaults
      kwonlydefaults = argspec.kwonlydefaults
      if defaults is None:
          defaults = tuple()
      if kwonlydefaults is None:
          kwonlydefaults = {}
  
      start_defaults_idx = len(arguments) - len(defaults)
      arguments = arguments[start_defaults_idx:]
      default_args = {
          argument: default
          for argument, default in zip(arguments, defaults)
      }
  
      return {
          **default_args,
          **kwonlydefaults,
      }
  
file_path: tensorly/tensorly/testing.py
imports: import sys
  from inspect import getfullargspec
  import numpy
  from tensorly import backend
label_desc: Use image node_id 5 for calling a global function with example usage: _get_defaultkwargs(func) and returns: dict