code: def get_num_positional_args(fun):
      """
      Returns the number of arguments that can be passed positionally to the `fun` call.
      """
      sig = inspect.signature(fun)
      return len(
          [
              name
              for name, param in sig.parameters.items()
              if param.kind
              in [
                  inspect.Parameter.POSITIONAL_OR_KEYWORD,
                  inspect.Parameter.POSITIONAL_ONLY,
              ]
          ]
      )
  
file_path: DALI/dali/python/nvidia/dali/auto_aug/core/_args.py
imports: import inspect
label_desc: Use image node_id 3 for calling a global function with example usage: get_num_positional_args(fun) and returns: len