code: def read_ogg_opus_format(ogg_file):
      error = ctypes.c_int()
      ogg_file_buffer = ogg_file.getbuffer()
      ubyte_array = ctypes.c_ubyte * len(ogg_file_buffer)
      opusfile = pyogg.opus.op_open_memory(
          ubyte_array.from_buffer(ogg_file_buffer),
          len(ogg_file_buffer),
          ctypes.pointer(error),
      )
  
      if error.value != 0:
          raise ValueError(
              (
                  "Ogg/Opus buffer could not be read." "Error code: {}"
              ).format(error.value)
          )
  
      channel_count = pyogg.opus.op_channel_count(opusfile, -1)
      pyogg.opus.op_free(opusfile)
  
      sample_rate = 48000  # opus files are always 48kHz
      sample_width = 2  # always 16-bit
      return AudioFormat(sample_rate, channel_count, sample_width)
  
imports: import collections
  import ctypes
  import io
  import math
  import numpy
  import os
  import pyogg
  import tempfile
  import wave
  from .helpers import LimitingPool
  from collections import namedtuple
  from .io import open_remote, remove_remote, copy_remote, is_remote_path
label_desc: Use image node_id 29 for calling a global function with example usage: read_ogg_opus_format(ogg_file) and returns: AudioFormat