def ToDebugString(self):
    """Converts the path segment weights into a debug string."""
    text_parts = ['Path segment index\tWeight']
    for path_segment_index, weight in self._weight_per_index.items():
      text_parts.append('{0:d}\t\t\t{1:d}'.format(
          path_segment_index, weight))
    text_parts.append('')

    text_parts.append('Weight\t\t\tPath segment index(es)')
    for weight, path_segment_indexes in self._indexes_per_weight.items():
      text_parts.append('{0:d}\t\t\t{1!s}'.format(
          weight, path_segment_indexes))
    text_parts.append('')

    return '\n'.join(text_parts)
def ToDebugString ( self ) : text_parts = [ 'Path segment index\tWeight' ] for path_segment_index , weight in self . _weight_per_index . items ( ) : text_parts . append ( '{0:d}\t\t\t{1:d}' . format ( path_segment_index , weight ) ) text_parts . append ( '' ) text_parts . append ( 'Weight\t\t\tPath segment index(es)' ) for weight , path_segment_indexes in self . _indexes_per_weight . items ( ) : text_parts . append ( '{0:d}\t\t\t{1!s}' . format ( weight , path_segment_indexes ) ) text_parts . append ( '' ) return '\n' . join ( text_parts )
Converts the path segment weights into a debug string.