code: def _sample_multidimensional_array(array, size):
      indices = np.random.choice(len(array), size, replace=False)
      return array[indices]
  
imports: import contextlib
  import dataclasses
  import logging
  from typing import Optional
  import numpy
  from sklearn import ensemble
  from sklearn import linear_model
  from sklearn import model_selection
  from sklearn import neighbors
  from sklearn import neural_network
  from sklearn.utils import parallel_backend
  from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack import data_structures
label_desc: Use image node_id 2 for calling a global function with example usage: _sample_multidimensional_array(array, size) and returns: array