parameters: (ref, ref_type, no_symb=False)
docstring: Display the reference depending on its type.
docstring_summary: Display the reference depending on its type.
docstring_tokens: Display the reference depending on its type .
function: def fmt_ref(ref, ref_type, no_symb=False):
      """
      Display the reference depending on its type.
      """
      if ref_type == 'distance':
          if no_symb:
              return '%.3f' % ref
          return '%.2f km' % ref
  
      if ref_type == 'percentage':
          if no_symb:
              return '%.3f' % ref
          return '%.1f %%' % (100 * ref)
  
      if ref_type == 'phonemes':
          if isinstance(ref, (list, tuple, set)):
              return SPLIT.join(str(e) for e in ref)
          else:
              return str(ref)
  
      if ref_type == 'index':
          return '%s' % int(ref)
  
      raise ValueError('ref_type %s was not allowed' % ref_type)
function_tokens: def fmt_ref ( ref , ref_type , no_symb = False ) : if ref_type == 'distance' : if no_symb : return '%.3f' % ref return '%.2f km' % ref if ref_type == 'percentage' : if no_symb : return '%.3f' % ref return '%.1f %%' % ( 100 * ref ) if ref_type == 'phonemes' : if isinstance ( ref , ( list , tuple , set ) ) : return SPLIT . join ( str ( e ) for e in ref ) else : return str ( ref ) if ref_type == 'index' : return '%s' % int ( ref ) raise ValueError ( 'ref_type %s was not allowed' % ref_type )