code: def _get_kwargs(schema):
      """
      Get the numpydoc-formatted docstring section for keywords arguments.
  
  
      schema : OpSchema
         Schema of the operator to be documented
      """
      ret = ""
      for arg in schema.GetArgumentNames():
          skip_full_doc = False
          type_name = ""
          dtype = None
          doc = ""
          deprecation_warning = None
          if schema.IsDeprecatedArg(arg):
              meta = schema.DeprecatedArgMeta(arg)
              msg = meta["msg"]
              assert msg is not None
              deprecation_warning = (
                  ".. warning::\n\n    " + msg.replace("\n", "\n    ")
              )
              renamed_arg = meta["renamed_to"]
              # Renamed and removed arguments won't show full documentation (only warning box)
              skip_full_doc = renamed_arg or meta["removed"]
              # Renamed aliases are not fully registered to the schema, that's why we query for the
              # info on the renamed_arg name.
              if renamed_arg:
                  dtype = schema.GetArgumentType(renamed_arg)
                  type_name = _type_name_convert_to_string(
                      dtype,
                      allow_tensors=schema.IsTensorArgument(
                          renamed_arg
                      ),
                  )
          # Try to get dtype only if not set already
          # (renamed args go through a different path, see above)
          if not dtype:
              dtype = schema.GetArgumentType(arg)
              type_name = _type_name_convert_to_string(
                  dtype, allow_tensors=schema.IsTensorArgument(arg)
              )
          # Add argument documentation if necessary
          if not skip_full_doc:
              if schema.IsArgumentOptional(arg):
                  type_name += ", optional"
                  if schema.HasArgumentDefaultValue(arg):
                      default_value_string = (
                          schema.GetArgumentDefaultValueString(arg)
                      )
                      default_value = ast.literal_eval(
                          default_value_string
                      )
                      type_name += ", default = `{}`".format(
                          _default_converter(dtype, default_value)
                      )
              doc += schema.GetArgumentDox(arg).rstrip("\n")
              if schema.ArgSupportsPerFrameInput(arg):
                  doc += "\n\nSupports :func:`per-frame<nvidia.dali.fn.per_frame>` inputs."
              if deprecation_warning:
                  doc += "\n\n" + deprecation_warning
          elif deprecation_warning:
              doc += deprecation_warning
          ret += _numpydoc_formatter(arg, type_name, doc)
          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 3 for calling a global function with example usage: _get_kwargs(schema) and returns: ret