def _replicate_elements(input_iterable, num_times):
 if (len(input_iterable) == 1):
  return ((input_iterable[0],) * num_times)
 return tuple(input_iterable)

def _replicate_elements ( input_iterable , num_times ) : if ( len ( input_iterable ) == 1 ) : return ( ( input_iterable [ 0 ] , ) * num_times ) return tuple ( input_iterable )
replicates entry in input_iterable if input_iterable is of length 1 .