code: def _get_inputs_doc(schema):
      """
      Generate numpydoc-formatted docstring section for operator inputs (positional arguments)
      based on the schema.
  
      The inputs are represented in `Args` section using `_numpydoc_formatter`.
  
      If schema provides names and docstrings for inputs, they are used, otherwise placeholder
      text is used indicating the supported number of inputs.
  
      Note: The type of input is indicated as TensorList with supported layouts listed.
  
      schema : OpSchema
         Schema of the operator to be documented
      """
      # Inputs section
      if schema.MaxNumInput() == 0:
          return ""
      ret = """
  Args
  ----
  """
      if schema.HasInputDox():
          for i in range(schema.MaxNumInput()):
              optional = i >= schema.MinNumInput()
              input_type_str = schema.GetInputType(
                  i
              ) + _supported_layouts_str(schema.GetSupportedLayouts(i))
              dox = schema.GetInputDox(i)
              input_name = _names._get_input_name(schema, i)
              ret += (
                  _numpydoc_formatter(
                      input_name, input_type_str, dox, optional
                  )
                  + "\n"
              )
      else:
          for i in range(schema.MinNumInput()):
              input_type_str = "TensorList" + _supported_layouts_str(
                  schema.GetSupportedLayouts(i)
              )
              dox = "Input to the operator."
              input_name = _names._get_input_name(schema, i)
              ret += (
                  _numpydoc_formatter(
                      input_name, input_type_str, dox, False
                  )
                  + "\n"
              )
  
          extra_opt_args = schema.MaxNumInput() - schema.MinNumInput()
          if extra_opt_args == 1:
              i = schema.MinNumInput()
              input_type_str = "TensorList" + _supported_layouts_str(
                  schema.GetSupportedLayouts(i)
              )
              dox = "Input to the operator."
              input_name = _names._get_input_name(schema, i)
              ret += (
                  _numpydoc_formatter(
                      input_name, input_type_str, dox, True
                  )
                  + "\n"
              )
          elif extra_opt_args > 1:
              input_type_str = "TensorList"
              generic_name = _names._get_generic_input_name(False)
              input_name = f"{generic_name}[{schema.MinNumInput()}..{schema.MaxNumInput()-1}]"
              dox = f"This function accepts up to {extra_opt_args} optional positional inputs"
              ret += (
                  _numpydoc_formatter(
                      input_name, input_type_str, dox, True
                  )
                  + "\n"
              )
  
      ret += "\n"
      return ret
  
file_path: DALI/dali/python/nvidia/dali/ops/_docs.py
imports: import ast
  from nvidia.dali import backend
  from nvidia.dali.types import _default_converter, _type_name_convert_to_string
  from nvidia.dali.ops import _registry, _names
label_desc: Use image node_id 2 for calling a global function with example usage: _get_inputs_doc(schema) and returns: ret, str