parameters: (basename)
docstring: Returns file name decorated with rank.
docstring_summary: Returns file name decorated with rank.
docstring_tokens: Returns file name decorated with rank .
function: def _rank_specific_filename(basename):
      """Returns file name decorated with rank."""
  
      if NumProcesses() == 1:
          return basename
      else:
          np = NumProcesses()
          np_digs = len(str(np - 1))  # for pretty formatting
          rk = Rank()
          dot = basename.find('.')
          if dot < 0:
              return '%s-%0*d' % (basename, np_digs, rk)
          else:
              return '%s-%0*d%s' % (basename[:dot], np_digs, rk, basename[dot:])
function_tokens: def _rank_specific_filename ( basename ) : if NumProcesses ( ) == 1 : return basename else : np = NumProcesses ( ) np_digs = len ( str ( np - 1 ) ) # for pretty formatting rk = Rank ( ) dot = basename . find ( '.' ) if dot < 0 : return '%s-%0*d' % ( basename , np_digs , rk ) else : return '%s-%0*d%s' % ( basename [ : dot ] , np_digs , rk , basename [ dot : ] )