code: def _check_max_seq_length_and_margin_and_step(
      max_seq_length: int, margin: int, step: int
  ):
      """
      Checks values of ``max_seq_length``, ``margin``, and ``step``.
      Args:
          max_seq_length: a segment length with ``[CLS]`` and ``[SEP]`` tokens
          margin: a number of input tokens near edges of segments which are not used in punctuation and capitalization
              prediction.
          step: offset of consequent segments.
      Returns:
          None
      """
      if max_seq_length < 3:
          raise ValueError(
              f"Parameter `max_seq_length={max_seq_length}` cannot be less than 3 because `max_seq_length` is a length "
              f"of a segment with [CLS] and [SEP] tokens."
          )
      if (
          margin >= (max_seq_length - 2) // 2
          and margin > 0
          or margin < 0
      ):
          raise ValueError(
              f"Parameter `margin` has to be not negative and less than `(max_seq_length - 2) // 2`. Don't forget about "
              f"CLS and EOS tokens in the beginning and the end of segment. margin={margin}, "
              f"max_seq_length={max_seq_length}"
          )
      if step <= 0:
          raise ValueError(
              f"Parameter `step` has to be positive whereas step={step}"
          )
      if step > max_seq_length - 2 - 2 * margin:
          logging.warning(
              f"Parameter step={step} is too big. It will be reduced to `min(max_seq_length, <maximum query length> + 2) "
              f"- 2 - 2 * margin`."
          )
  
imports: import io
  import itertools
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from numpy import ndarray
  from torch import Tensor
  from torch.nn.utils.rnn import pad_sequence
  from nemo.collections.common.tokenizers import TokenizerSpec
  from nemo.collections.nlp.data import get_stats
  from nemo.core import Dataset
  from nemo.core.neural_types import ChannelType, Index, MaskType, NeuralType
  from nemo.core.neural_types.elements import AudioSignal, BoolType, LengthsType
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: _check_max_seq_length_and_margin_and_step(max_seq_length, margin, step) without return types