'Args:
shapes (list): a list of lists/tuples. Shapes of each component.
size (int): size of this DataFlow.
random (bool): whether to randomly generate data every iteration.
Note that merely generating the data could sometimes be time-consuming!
dtype (str or list): data type as string, or a list of data types.
domain (tuple or list): (min, max) tuple, or a list of such tuples'

def __init__(self, shapes, size=1000, random=True, dtype='float32', domain=(0, 1)):

    super(FakeData, self).__init__()
    self.shapes = shapes
    self._size = int(size)
    self.random = random
    self.dtype = (([dtype] * len(shapes)) if isinstance(dtype, six.string_types) else dtype)
    self.domain = (([domain] * len(shapes)) if isinstance(domain, tuple) else domain)
    assert (len(self.dtype) == len(self.shapes))
    assert (len(self.domain) == len(self.domain))
