parameters: (axes)
return_statement: return Axis(name, value)
docstring: Concatenate a list of Axes.
  
    Args:
      axes: A collection of Axis objects.
  
    Returns:
      The concatenation of the axes.
      If all axes have labels, the result has the concatenation of the labels.
      Else, the result has no labels, and its size is the sum of the sizes
      of the axes.
  
    Raises:
      ValueError: If `others` is not a collection of Axes or if it is empty.
docstring_summary: Concatenate a list of Axes.
docstring_tokens: Concatenate a list of Axes .
function: def concat_axes(axes):
    """Concatenate a list of Axes.
  
    Args:
      axes: A collection of Axis objects.
  
    Returns:
      The concatenation of the axes.
      If all axes have labels, the result has the concatenation of the labels.
      Else, the result has no labels, and its size is the sum of the sizes
      of the axes.
  
    Raises:
      ValueError: If `others` is not a collection of Axes or if it is empty.
    """
    if not axes:
      raise ValueError('axes must not be empty')
    for a in axes:
      if not isinstance(a, Axis):
        raise ValueError('Expected an Axis, but got %r of type %r' % (a, type(a)))
  
    names = set(a.name for a in axes)
    if len(names) > 1:
      raise ValueError('axes do not all have the same name: %r' % names)
    name, = names
  
    all_have_labels = all(a.labels is not None for a in axes)
    any_has_unknown_size = any(a.size is None for a in axes)
  
    if all_have_labels:
      value = tuple(label for a in axes for label in a.labels)
    elif any_has_unknown_size:
      value = None
    else:
      value = sum(len(a) for a in axes)
    return Axis(name, value)
function_tokens: def concat_axes ( axes ) : if not axes : raise ValueError ( 'axes must not be empty' ) for a in axes : if not isinstance ( a , Axis ) : raise ValueError ( 'Expected an Axis, but got %r of type %r' % ( a , type ( a ) ) ) names = set ( a . name for a in axes ) if len ( names ) > 1 : raise ValueError ( 'axes do not all have the same name: %r' % names ) name , = names all_have_labels = all ( a . labels is not None for a in axes ) any_has_unknown_size = any ( a . size is None for a in axes ) if all_have_labels : value = tuple ( label for a in axes for label in a . labels ) elif any_has_unknown_size : value = None else : value = sum ( len ( a ) for a in axes ) return Axis ( name , value )