def create_status_line(**params):
 max_size = (get_terminal_size().columns - 1)
 for fmt in PROGRESS_FORMATS:
  status = fmt.format(**params)
  if (len(status) <= max_size):
   break
 return status

def create_status_line ( ** params ) : max_size = ( get_terminal_size ( ) . columns - 1 ) for fmt in PROGRESS_FORMATS : status = fmt . format ( ** params ) if ( len ( status ) <= max_size ) : break return status
creates a status line with appropriate size .