code: def find_longest_continuous_segment(sequence_indices):
      """
      ind the longest consecutive segment in the given sequence.
  
      Parameters
      ----------
      sequence_indices : numpy array
          Indices of the beats
  
      Returns
      -------
      length : int
          Length of the longest consecutive segment.
      start : int
          Start position of the longest continuous segment.
  
      """
      # continuous segments have consecutive indices, i.e. diffs =! 1 are
      # boundaries between continuous segments; add 1 to get the correct index
      boundaries = np.nonzero(np.diff(sequence_indices) != 1)[0] + 1
      # add a start (index 0) and stop (length of correct detections) to the
      # segment boundary indices
      boundaries = np.concatenate(
          ([0], boundaries, [len(sequence_indices)])
      )
      # lengths of the individual segments
      segment_lengths = np.diff(boundaries)
      # return the length and start position of the longest continuous segment
      length = int(np.max(segment_lengths))
      start_pos = int(boundaries[np.argmax(segment_lengths)])
      return length, start_pos
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  from functools import wraps
  import numpy
  from .None import MeanEvaluation, calc_absolute_errors, calc_errors, evaluation_io, find_closest_matches
  from .onsets import OnsetEvaluation
label_desc: Use image node_id 6 for calling a global function with example usage: find_longest_continuous_segment(sequence_indices) and returns: length,  start_pos