def _depth_count(x):
    """Return maximum depth of the returned list.

    Parameters
    ----------
    x : list.

    Return
    ------
    ans : int
        maximum depth.
    """
    return int(isinstance(x,
                          list)) and len(x) and 1 + max(map(_depth_count, x))