class_docstr: Simple numpy data generator backed by numpy arrays.
  
  Can be useful for applying numpy data to estimators in other frameworks
      e.g., when translating the entire numpy data to GPU tensors would cause OOM
code: def __iter__(self):
      if self.shuffle:
          index = np.arange(self.size)
          np.random.shuffle(index)
          for i in range(self.batches_per_epoch):
              batch_index = index[
                  i * self.batch_size : (i + 1) * self.batch_size
              ]
              yield (self.x[batch_index], self.y[batch_index])
      else:
          for i in range(self.batches_per_epoch):
              yield (
                  self.x[
                      i * self.batch_size : (i + 1) * self.batch_size
                  ],
                  self.y[
                      i * self.batch_size : (i + 1) * self.batch_size
                  ],
              )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import abc
  import inspect
  import logging
  from typing import Any, Dict, Generator, Iterator, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
label_desc: Use image node_id 2 for calling the NumpyDataGenerator obj's underlying member method code with example usage: obj.__iter__() without return types