code: def _get_keyword_params(schema, all_args_optional=False):
      """Get the list of annotated keyword Parameters to the operator."""
      param_list = []
      for arg in schema.GetArgumentNames():
          if schema.IsDeprecatedArg(arg):
              # We don't put the deprecated args in the visible API
              continue
          arg_dtype = schema.GetArgumentType(arg)
          kw_annotation = _arg_type_annotation(arg_dtype)
          is_arg_input = schema.IsTensorArgument(arg)
  
          if is_arg_input:
              annotation = Union[
                  _DataNode, _TensorLikeArg, kw_annotation
              ]
          else:
              annotation = kw_annotation
  
          if schema.IsArgumentOptional(arg):
              # In DALI arguments can always accept optional, and the propagation of such argument
              # is skipped. Passing None is equivalent to not providing the argument at all,
              # and is typically resolved to the default value (but can have special meaning).
              annotation = Optional[annotation]
  
          default = Parameter.empty
          if schema.HasArgumentDefaultValue(arg):
              default_value_string = (
                  schema.GetArgumentDefaultValueString(arg)
              )
              default_value = ast.literal_eval(default_value_string)
              default = types._type_convert_value(
                  arg_dtype, default_value
              )
              if type(default) in _enum_mapping:
                  default = _enum_mapping[type(default)](default)
          elif schema.IsArgumentOptional(arg):
              default = None
  
          # Workaround for `ops` API where keyword args can be specified in either one of __init__
          # and __call__, so we can't make them mandatory anywhere.
          if all_args_optional:
              annotation = Optional[annotation]
              if default == Parameter.empty:
                  default = None
  
          param_list.append(
              Parameter(
                  name=arg,
                  kind=Parameter.KEYWORD_ONLY,
                  default=default,
                  annotation=annotation,
              )
          )
  
      # We omit the **kwargs, as we already specified all possible parameters:
      # param_list.append(Parameter("kwargs", Parameter.VAR_KEYWORD))
      # We could add it, but it would behave as catch all.
      return param_list
  
imports: from inspect import Parameter, Signature
  import ast
  import os
  from pathlib import Path
  from contextlib import closing
  from typing import Union, Optional
  from typing import Sequence, List, Any
  from nvidia.dali import backend
  from nvidia.dali import types
  from nvidia.dali.ops import _registry, _names, _docs
  from nvidia.dali import types
  from nvidia.dali import ops, fn
label_desc: Use image node_id 10 for calling a global function with example usage: _get_keyword_params(schema, all_args_optional) and returns: param_list