code: def _convert_config(cfg: CodecConfig):
      if cfg is None:
          return None
      # Convert the codecconfig to C++ compatible type.
      # omitting the return type annotation so as not to access ffmpeg_ext here.
      return ffmpeg_ext.CodecConfig(
          cfg.bit_rate,
          cfg.compression_level,
          cfg.qscale,
          cfg.gop_size,
          cfg.max_b_frames,
      )
  
imports: from dataclasses import dataclass
  from pathlib import Path
  from typing import BinaryIO, Dict, Optional, Union
  import torch
  import torio
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_config(cfg) and returns: ffmpeg_ext, None