code: def _group_signatures(api: str):
      """Divide all operators registered into the "ops" or "fn" api into 4 categories and return them
      as a dictionary:
      * python_only - there is just the Python definition
      * hidden_or_internal - op is hidden or internal, defined in backend
      * python_wrapper - op defined in backend, has a hand-written wrapper (op._generated = False)
      * generated - op was generated automatically from backend definition (op._generated = True)
  
      Each entry in the dict contains a list of: `(schema_name : str, op : Callable or Class)`
      depending on the api type.
  
      """
      sig_groups = {
          "python_only": [],
          "hidden_or_internal": [],
          "python_wrapper": [],
          "generated": [],
      }
  
      api_module = fn if api == "fn" else ops
  
      for schema_name in sorted(_registry._all_registered_ops()):
          schema = _b.TryGetSchema(schema_name)
  
          _, module_nesting, op_name = _names._process_op_name(
              schema_name, api=api
          )
          op = _get_op(api_module, module_nesting + [op_name])
  
          if schema is None:
              if op is not None:
                  sig_groups["python_only"].append((schema_name, op))
              continue
  
          if schema.IsDocHidden() or schema.IsInternal():
              sig_groups["hidden_or_internal"].append((schema_name, op))
              continue
  
          if not getattr(op, "_generated", False):
              sig_groups["python_wrapper"].append((schema_name, op))
              continue
  
          sig_groups["generated"].append((schema_name, op))
  
      return sig_groups
  
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 22 for calling a global function with example usage: _group_signatures(api) and returns: sig_groups