def colstack(seq, mode='<STR_LIT>',returnnaming=False):
assert mode in ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>'],'<STR_LIT>'<EOL>AllNames = utils.uniqify(utils.listunion(<EOL>[list(l.dtype.names) for l in seq]))<EOL>NameList = [(x, [i for i in range(len(seq)) if x in seq[i].dtype.names]) <EOL>for x in AllNames]<EOL>Commons = [x[<NUM_LIT:0>] for x in NameList if len(x[<NUM_LIT:1>]) > <NUM_LIT:1>]<EOL>if len(Commons) > <NUM_LIT:0> or mode == '<STR_LIT>':<EOL><INDENT>if mode == '<STR_LIT>':<EOL><INDENT>raise ValueError('<STR_LIT>' +              <EOL>'<STR_LIT>')<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>Names = [(L[<NUM_LIT:0>], x,x) for (x, L) in NameList if x not in Commons]<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>NameDict = dict(NameList)<EOL>Names = utils.listunion([[(i,n,n) if len(NameDict[n]) == <NUM_LIT:1> else(i,n,n + '<STR_LIT:_>' + str(i)) for n in s.dtype.names]for (i,s) in enumerate(seq)])                           <EOL><DEDENT><DEDENT>else:<EOL><INDENT>Names = [(L[<NUM_LIT:0>], x,x) for (x, L) in NameList]<EOL><DEDENT>if returnnaming:<EOL><INDENT>return  utils.fromarrays([seq[i][x] for (i, x,y) in Names], <EOL>type= np.ndarray,names=list(zip(*Names))[<NUM_LIT:2>]),Names<EOL><DEDENT>else:<EOL><INDENT>return utils.fromarrays([seq[i][x] for (i, x,y) in Names], <EOL>type= np.ndarray,names=list(zip(*Names))[<NUM_LIT:2>])<EOL><DEDENT>
Horizontally stack a sequence of numpy ndarrays with structured dtypes

Analog of numpy.hstack for recarrays.

Implemented by the tabarray method 
:func:`tabular.tab.tabarray.colstack` which uses 
:func:`tabular.tabarray.tab_colstack`.

**Parameters**

        **seq** :  sequence of numpy ndarray with structured dtype

                List, tuple, etc. of numpy recarrays to stack vertically.

        **mode** :  string in ['first','drop','abort','rename']

                Denotes how to proceed if when multiple recarrays share the 
                same column name:

                *   if `mode` == ``first``, take the column from the first
                    recarray in `seq` containing the shared column name.

                *   elif `mode` == ``abort``, raise an error when the 
                    recarrays to stack share column names; this is the
                    default mode.

                *   elif `mode` == ``drop``, drop any column that shares    
                    its name with any other column among the sequence of 
                    recarrays.

                *   elif `mode` == ``rename``, for any set of all columns
                    sharing the same name, rename all columns by appending 
                    an underscore, '_', followed by an integer, starting 
                    with '0' and incrementing by 1 for each subsequent 
                    column.

**Returns**

        **out** :  numpy ndarray with structured dtype

                Result of horizontally stacking the arrays in `seq`.

**See also:**  `numpy.hstack 
<http://docs.scipy.org/doc/numpy/reference/generated/numpy.hstack.html>`_.