code: def num_positional_args(draw, *, fn_name: Optional[str] = None):
      """Draws an integers randomly from the minimum and maximum number of
      positional arguments a given function can take.
  
      Parameters
      ----------
      draw
          special function that draws data randomly (but is reproducible) from a
          given data-set (ex. list).
      fn_name
          name of the function.
  
      Returns
      -------
      A strategy that can be used in the @given hypothesis decorator.
  
      Examples
      --------
      @given(
          num_positional_args=num_positional_args(fn_name="floor_divide")
      )
      @given(
          num_positional_args=num_positional_args(fn_name="add")
      )
      """
      if mod_backend[t_globals.CURRENT_BACKEND]:
          proc, input_queue, output_queue = mod_backend[
              t_globals.CURRENT_BACKEND
          ]
          input_queue.put(
              (
                  "num_positional_args_helper",
                  fn_name,
                  t_globals.CURRENT_BACKEND,
              )
          )
          (
              num_positional_only,
              total,
              num_keyword_only,
          ) = output_queue.get()
      else:
          (
              num_positional_only,
              total,
              num_keyword_only,
          ) = num_positional_args_helper(
              fn_name, t_globals.CURRENT_BACKEND
          )
      return draw(
          nh.ints(
              min_value=num_positional_only,
              max_value=(total - num_keyword_only),
          )
      )
  
imports: import json
  import os
  import pytest
  import importlib
  import inspect
  import functools
  from typing import List, Optional
  from hypothesis import given, strategies
  import ivy.functional.frontends.numpy
  from .hypothesis_helpers import number_helpers
  from .globals import TestData
  from .None import test_parameter_flags
  from .None import test_globals
  from .pipeline_helper import BackendHandler
  from ivy_tests.test_ivy.helpers.test_parameter_flags import DynamicFlag, BuiltInstanceStrategy, BuiltAsVariableStrategy, BuiltNativeArrayStrategy, BuiltGradientStrategy, BuiltContainerStrategy, BuiltWithOutStrategy, BuiltWithCopyStrategy, BuiltInplaceStrategy, BuiltTraceStrategy, BuiltFrontendArrayStrategy, BuiltTranspileStrategy, BuiltPrecisionModeStrategy, BuiltCythonWrapperStrategy
  from ivy_tests.test_ivy.helpers.structs import FrontendMethodData
  from ivy_tests.test_ivy.helpers.available_frameworks import available_frameworks
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.dtype_helpers import _dtype_kind_keys, _get_type_dict
  from .globals import mod_backend
label_desc: Use image node_id 3 for calling a global function with example usage: num_positional_args(draw) and returns: draw