def _group_axes_data(inputs, separate=None, flat=False):
<EOL>if separate is None and inputs:<EOL><INDENT>if any(isinstance(x, iterable_types + (dict,)) for x in inputs):<EOL><INDENT>separate = True<EOL><DEDENT>elif not all(type(x) is type(inputs[<NUM_LIT:0>]) for x in inputs):  <EOL><INDENT>separate = True<EOL><DEDENT><DEDENT>out = []<EOL>for x in inputs:<EOL><INDENT>if isinstance(x, dict):  <EOL><INDENT>x = list(x.values())<EOL><DEDENT>if (<EOL>isinstance(x, (KeysView, ValuesView)) or<EOL>isinstance(x, (list, tuple)) and (<EOL>not x or not numpy.isscalar(x[<NUM_LIT:0>]))<EOL>):<EOL><INDENT>out.append(x)<EOL><DEDENT>elif separate or not out:<EOL><INDENT>out.append([x])<EOL><DEDENT>else:  <EOL><INDENT>out[-<NUM_LIT:1>].append(x)<EOL><DEDENT><DEDENT>if flat:<EOL><INDENT>return [s for group in out for s in group]<EOL><DEDENT>return out<EOL>
Determine the number of axes from the input args to this `Plot`

    Parameters
    ----------
    inputs : `list` of array-like data sets
        A list of data arrays, or a list of lists of data sets

    sep : `bool`, optional
        Plot each set of data on a separate `Axes`

    flat : `bool`, optional
        Return a flattened list of data objects

    Returns
    -------
    axesdata : `list` of lists of array-like data
        A `list` with one element per required `Axes` containing the
        array-like data sets for those `Axes`, unless ``flat=True``
        is given.

    Notes
    -----
    The logic for this method is as follows:

    - if a `list` of data arrays are given, and `separate=False`, use 1 `Axes`
    - if a `list` of data arrays are given, and `separate=True`, use N `Axes,
      one for each data array
    - if a nested `list` of data arrays are given, ignore `sep` and
      use one `Axes` for each group of arrays.

    Examples
    --------
    >>> from gwpy.plot import Plot
    >>> Plot._group_axes_data([1, 2], separate=False)
    [[1, 2]]
    >>> Plot._group_axes_data([1, 2], separate=True)
    [[1], [2]]
    >>> Plot._group_axes_data([[1, 2], 3])
    [[1, 2], [3]]