def __init__(self, imgs, z=None, dynamic=False):
        '''
        dynamic -> whether imgs and/or z are callable
                   and data is freshly fetched every time this class is called
        '''
        if z is None and not dynamic:
            self.z = np.arange(len(imgs))
        else:
            self.z = z
        self.imgs = imgs
        
        if dynamic:
            self._call = self._call_dynamic
        else:
            self._call = self._call_static
def __init__ ( self , imgs , z = None , dynamic = False ) : if z is None and not dynamic : self . z = np . arange ( len ( imgs ) ) else : self . z = z self . imgs = imgs if dynamic : self . _call = self . _call_dynamic else : self . _call = self . _call_static
dynamic -> whether imgs and/or z are callable
                   and data is freshly fetched every time this class is called