def _get_like_function_shapes_chunks(a, chunks, shape):
    """
    Helper function for finding shapes and chunks for *_like()
    array creation functions.
    """
    if shape is None:
        shape = a.shape
        if chunks is None:
            chunks = a.chunks
    elif chunks is None:
        chunks = "auto"
    return shape, chunks