code: def _read_data_chunk(
      fid, format_tag, channels, bit_depth, is_big_endian, mmap=False
  ):
      if is_big_endian:
          fmt = ">I"
      else:
          fmt = "<I"
  
      # Size of the data subchunk in bytes
      size = struct.unpack(fmt, fid.read(4))[0]
  
      # Number of bytes per sample
      bytes_per_sample = bit_depth // 8
      if bit_depth == 8:
          dtype = "u1"
      else:
          if is_big_endian:
              dtype = ">"
          else:
              dtype = "<"
          if format_tag == WAVE_FORMAT_PCM:
              dtype += "i%d" % bytes_per_sample
          else:
              dtype += "f%d" % bytes_per_sample
      if not mmap:
          data = numpy.frombuffer(fid.read(size), dtype=dtype)
      else:
          start = fid.tell()
          data = numpy.memmap(
              fid,
              dtype=dtype,
              mode="c",
              offset=start,
              shape=(size // bytes_per_sample,),
          )
          fid.seek(start + size)
  
      if channels > 1:
          data = data.reshape(-1, channels)
      return data
  
file_path: catboost/contrib/python/scipy/py2/scipy/io/wavfile.py
imports: from __future__ import division, print_function, absolute_import
  import sys
  import numpy
  import struct
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: _read_data_chunk(fid, format_tag, channels, bit_depth, is_big_endian, mmap) and returns: data