def METHOD_NAME(client, array):
    if array.dtype.name != 'object':
        if not array.flags['C_CONTIGUOUS']:
            array = np.ascontiguousarray(array)
        address, _ = array.__array_interface__['data']
        return build_buffer(client, address, array.nbytes)
    else:
        payload = pickle.dumps(array, protocol=5)
        return build_buffer(client, payload, len(payload))