def _squeeze_cat(results, combine, squeeze):
 if combine:
  results = np.concatenate(results)
  if (not squeeze):
   results = [results]
 elif (squeeze and (len(results) == 1)):
  results = results[0]
 return results

def _squeeze_cat ( results , combine , squeeze ) : if combine : results = np . concatenate ( results ) if ( not squeeze ) : results = [ results ] elif ( squeeze and ( len ( results ) == 1 ) ) : results = results [ 0 ] return results
squeeze and concatenate the results depending on values of combine and squeeze .