code: def load_beats(filename, downbeats=False):
      """
      Load the beats from the given file, one beat per line of format
      'beat_time' ['beat_number'].
  
      Parameters
      ----------
      filename : str or file handle
          File to load the beats from.
      downbeats : bool, optional
          Load only downbeats instead of beats.
  
      Returns
      -------
      numpy array
          Beats.
  
      """
      values = np.loadtxt(filename, ndmin=2)
      if downbeats:
          # rows with a "1" in the 2nd column are downbeats
          values = values[values[:, 1] == 1]
      return values[:, 0]
  
imports: from __future__ import absolute_import, division, print_function
  import contextlib
  import io
  import numpy
  from .audio import load_audio_file
  from .midi import load_midi, write_midi
  from ..utils import suppress_warnings, string_types
label_desc: Use image node_id 4 for calling a global function with example usage: load_beats(filename, downbeats) and returns: values