def format_params(paramlist, otherlist=None):
 hdr = u'Parameters'
 delim = u'----------'
 paramlist.insert(0, delim)
 paramlist.insert(0, hdr)
 params = u'\n'.join(paramlist)
 otherparams = []
 doc = u''.join(params)
 if otherlist:
  hdr = u'Others Parameters'
  delim = u'-----------------'
  otherlist.insert(0, delim)
  otherlist.insert(0, hdr)
  otherlist.insert(0, u'\n')
  otherparams = u'\n'.join(otherlist)
  doc = u''.join([doc, otherparams])
 return doc

def format_params ( paramlist , otherlist = None ) : hdr = u'Parameters' delim = u'----------' paramlist . insert ( 0 , delim ) paramlist . insert ( 0 , hdr ) params = u'\n' . join ( paramlist ) otherparams = [ ] doc = u'' . join ( params ) if otherlist : hdr = u'Others Parameters' delim = u'-----------------' otherlist . insert ( 0 , delim ) otherlist . insert ( 0 , hdr ) otherlist . insert ( 0 , u'\n' ) otherparams = u'\n' . join ( otherlist ) doc = u'' . join ( [ doc , otherparams ] ) return doc
format the parameters according to the nipy style conventions .