def METHOD_NAME(samples: np.ndarray):
    arr = Array("B", 2 * len(samples), lock=False)
    numpy_view = np.frombuffer(arr, dtype=np.uint8)
    numpy_view[:] = samples.flatten(order="C")
    return arr