def METHOD_NAME(array, container, buffer_key, form_key, id_start, backend, byteorder):
    layout = ak.operations.to_layout(array, allow_record=False, allow_other=False)
    if backend is not None:
        backend = regularize_backend(backend)
    return ak._do.to_buffers(
        layout,
        container=container,
        buffer_key=buffer_key,
        form_key=form_key,
        id_start=id_start,
        backend=backend,
        byteorder=byteorder,
    )