code: def _get_load_filter(
      frame_offset: int = 0,
      num_frames: int = -1,
      convert: bool = True,
  ) -> Optional[str]:
      if frame_offset < 0:
          raise RuntimeError(
              "Invalid argument: frame_offset must be non-negative. Found: {}".format(
                  frame_offset
              )
          )
      if num_frames == 0 or num_frames < -1:
          raise RuntimeError(
              "Invalid argument: num_frames must be -1 or greater than 0. Found: {}".format(
                  num_frames
              )
          )
  
      # All default values -> no filter
      if frame_offset == 0 and num_frames == -1 and not convert:
          return None
      # Only convert
      aformat = "aformat=sample_fmts=fltp"
      if frame_offset == 0 and num_frames == -1 and convert:
          return aformat
      # At least one of frame_offset or num_frames has non-default value
      if num_frames > 0:
          atrim = "atrim=start_sample={}:end_sample={}".format(
              frame_offset, frame_offset + num_frames
          )
      else:
          atrim = "atrim=start_sample={}".format(frame_offset)
      if not convert:
          return atrim
      return "{},{}".format(atrim, aformat)
  
imports: import os
  import re
  import sys
  from typing import BinaryIO, Optional, Tuple, Union
  import torch
  import torchaudio
  from .backend import Backend
  from .common import AudioMetaData
label_desc: Use image node_id 2 for calling a global function with example usage: _get_load_filter(frame_offset, num_frames, convert) and returns: str, None, aformat, atrim