code: def _read_ch(fid, subtype, samp, dtype_byte, dtype=None):
      """Read a number of samples for a single channel."""
      # BDF
      if subtype == "bdf":
          ch_data = np.fromfile(
              fid, dtype=dtype, count=samp * dtype_byte
          )
          ch_data = ch_data.reshape(-1, 3).astype(INT32)
          ch_data = (
              (ch_data[:, 0])
              + (ch_data[:, 1] << 8)
              + (ch_data[:, 2] << 16)
          )
          # 24th bit determines the sign
          ch_data[ch_data >= (1 << 23)] -= 1 << 24
  
      # GDF data and EDF data
      else:
          ch_data = np.fromfile(fid, dtype=dtype, count=samp)
  
      return ch_data
  
imports: import os
  import re
  from datetime import datetime, timedelta, timezone
  import numpy
  from scipy.interpolate import interp1d
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info, _unique_channel_names
  from ..._fiff.utils import _blk_read_lims, _mult_cal_one
  from ...annotations import Annotations
  from ...filter import resample
  from ...utils import _validate_type, fill_doc, logger, verbose, warn
  from ..base import BaseRaw, _get_scaling
label_desc: Use image node_id 1 for calling a global function with example usage: _read_ch(fid, subtype, samp, dtype_byte, dtype) and returns: ch_data