code: def _replace_labels(doc):
      
      lines = doc.splitlines()
      labelstart, labelend = None, None
      foundattributes = False
      for i, line in enumerate(lines):
          stripped = line.strip()
          if stripped == 'Attributes':
              foundattributes = True
          if foundattributes and not labelstart and stripped.startswith('labels_'):
              labelstart = len('\n'.join(lines[:i])) + 1
          if labelstart and not labelend and stripped == '':
              labelend = len('\n'.join(lines[:i + 1]))
  
      if labelstart is None or labelend is None:
          return doc
  
      replace = '\n'.join([
          '    labels_ : list of arrays, each of shape [sequence_length, ]',
          '        The label of each point is an integer in [0, n_clusters).',
          '',
      ])
      return doc[:labelstart] + replace + doc[labelend:]
docs: Really hacky find-and-replace method that modifies one of the sklearn
      docstrings to change the semantics of labels_ for the subclasses