def METHOD_NAME(chunks, dtype=None):
    """Deserialize gRPC chunks into a numpy array
    Parameters
    ----------
    chunks : generator
        generator from grpc.  Each chunk contains a bytes payload
    dtype : np.dtype
        Numpy data type to interpret chunks as.
    Returns
    -------
    array : np.ndarray
        Deserialized numpy array.
    """
    if not chunks.is_active():
        raise MapdlConnectionError("The channel is not alive.")
    try:
        chunk = chunks.next()
    except:
        return np.empty(0)
    if not chunk.value_type and dtype is None:
        raise ValueError("Must specify a data type for this record")
    if dtype is None:
        dtype = ANSYS_VALUE_TYPE[chunk.value_type]
    array = np.frombuffer(chunk.payload, dtype)
    if chunks.done():
        return array
    arrays = [array]
    for chunk in chunks:
        arrays.append(np.frombuffer(chunk.payload, dtype))
    return np.hstack(arrays)