code: def number_of_arguments(func):
      """
      Return the number of arguments of the passed function, even if it's a partial function.
      """
      if isinstance(func, functools.partial):
          total_args = len(inspect.signature(func.func).parameters)
          return total_args - len(func.args) - len(func.keywords)
      return len(inspect.signature(func).parameters)
  
imports: import copy
  import functools
  import gc
  import inspect
  import os
  import random
  import re
  import threading
  import time
  from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Union
  import numpy
  from .utils import ExplicitEnum, is_psutil_available, is_tf_available, is_torch_available, is_torch_cuda_available, is_torch_tpu_available, requires_backends
label_desc: Use image node_id 15 for calling a global function with example usage: number_of_arguments(func) and returns: len, unknown