code: def _determine_nsamples(bin_fname, nchans, precision):
      """Identify how many temporal samples in a dataset."""
      bsize = bin_fname.stat().st_size
      if precision == "single":
          bps = 4
      else:
          bps = 8
      nsamples = int(bsize / (nchans * bps))
      return nsamples
  
imports: import json
  import pathlib
  import numpy
  from ..._fiff._digitization import _make_dig_points
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.utils import _read_segments_file
  from ..._fiff.write import get_new_file_id
  from ...transforms import Transform, apply_trans, get_ras_to_neuromag_trans
  from ...utils import _check_fname, fill_doc, verbose, warn
  from ..base import BaseRaw
  from .sensors import _get_plane_vectors, _get_pos_units, _refine_sensor_orientation, _size2units
label_desc: Use image node_id 4 for calling a global function with example usage: _determine_nsamples(bin_fname, nchans, precision) and returns: nsamples