code: def load_tempo(
      filename,
      split_value=1.0,
      sort=None,
      norm_strengths=None,
      max_len=None,
  ):
      """
      Load tempo information from the given file.
  
      Tempo information must have the following format:
      'main tempo' ['secondary tempo' ['relative_strength']]
  
      Parameters
      ----------
      filename : str or file handle
          File to load the tempo from.
      split_value : float, optional
          Value to distinguish between tempi and strengths.
          `values` > `split_value` are interpreted as tempi [bpm],
          `values` <= `split_value` are interpreted as strengths.
      sort : bool, deprecated
          Sort the tempi by their strength.
      norm_strengths : bool, deprecated
          Normalize the strengths to sum 1.
      max_len : int, deprecated
          Return at most `max_len` tempi.
  
      Returns
      -------
      tempi : numpy array, shape (num_tempi[, 2])
          Array with tempi. If no strength is parsed, a 1-dimensional array of
          length 'num_tempi' is returned. If strengths are given, a 2D array
          with tempi (first column) and their relative strengths (second column)
          is returned.
  
  
      """
      # try to load the data from file
      values = np.loadtxt(filename, ndmin=1)
      # split the filename according to their filename into tempi and strengths
      # TODO: this is kind of hack-ish, find a better solution
      tempi = values[values > split_value]
      strengths = values[values <= split_value]
      # make the strengths behave properly
      strength_sum = np.sum(strengths)
      # relative strengths are given (one less than tempi)
      if len(tempi) - len(strengths) == 1:
          strengths = np.append(strengths, 1.0 - strength_sum)
          if np.any(strengths < 0):
              raise AssertionError("strengths must be positive")
      # no strength is given, assume an evenly distributed one
      if strength_sum == 0:
          strengths = np.ones_like(tempi) / float(len(tempi))
      # normalize the strengths
      if norm_strengths is not None:
          import warnings
  
          warnings.warn(
              "`norm_strengths` is deprecated as of version 0.16 and "
              "will be removed in 0.18. Please normalize strengths "
              "separately."
          )
          strengths /= float(strength_sum)
      # tempi and strengths must have same length
      if len(tempi) != len(strengths):
          raise AssertionError(
              "tempi and strengths must have same length"
          )
      # order the tempi according to their strengths
      if sort:
          import warnings
  
          warnings.warn(
              "`sort` is deprecated as of version 0.16 and will be "
              "removed in 0.18. Please sort the returned array "
              "separately."
          )
          # Note: use 'mergesort', because we want a stable sorting algorithm
          #       which keeps the order of the keys in case of duplicate keys
          #       but we need to apply this '(-strengths)' trick because we want
          #       tempi with uniformly distributed strengths to keep their order
          sort_idx = (-strengths).argsort(kind="mergesort")
          tempi = tempi[sort_idx]
          strengths = strengths[sort_idx]
      # return at most 'max_len' tempi and their relative strength
      if max_len is not None:
          import warnings
  
          warnings.warn(
              "`max_len` is deprecated as of version 0.16 and will be "
              "removed in 0.18. Please truncate the returned array "
              "separately."
          )
      return np.vstack((tempi[:max_len], strengths[:max_len])).T
  
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 14 for calling a global function with example usage: load_tempo(filename, split_value, sort, norm_strengths, max_len) and returns: np