code: def _get_annotation_return_regular(schema):
      """Produce the return annotation for DALI operator suitable for primary, non-MIS overload.
      Note the flattening, single output is not packed in Sequence.
      """
      if schema.HasOutputFn():
          # Dynamic number of outputs, not known at "compile time"
          return_annotation = Union[
              _DataNode, Sequence[_DataNode], None
          ]
      else:
          # Call it with a dummy spec, as we don't have Output function
          num_regular_output = schema.CalculateOutputs(_b.OpSpec(""))
          if num_regular_output == 0:
              return_annotation = None
          elif num_regular_output == 1:
              return_annotation = _DataNode
          else:
              # Here we could utilize the fact, that the tuple has known length, but we can't
              # as DALI operators return a list
              # Also, we don't advertise the actual List type, hence the Sequence.
              return_annotation = Sequence[_DataNode]
      return return_annotation
  
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 6 for calling a global function with example usage: _get_annotation_return_regular(schema) and returns: return_annotation