(self, keys, getter)
Register a getter function

        Args:
            keys (string or tuple of strings): The name(s) of data
                that the getter function returns.
            getter (callable): A getter function that takes an index and
                returns data of the corresponding example.
Register a getter function
Register a getter function
def add_getter(self, keys, getter):
        """Register a getter function

        Args:
            keys (string or tuple of strings): The name(s) of data
                that the getter function returns.
            getter (callable): A getter function that takes an index and
                returns data of the corresponding example.
        """
        self._getters.append(getter)
        if _is_iterable(keys):
            for key_index, key in enumerate(keys):
                self._keys.append((key, len(self._getters) - 1, key_index))
        else:
            self._keys.append((keys, len(self._getters) - 1, None))
def add_getter ( self , keys , getter ) : self . _getters . append ( getter ) if _is_iterable ( keys ) : for key_index , key in enumerate ( keys ) : self . _keys . append ( ( key , len ( self . _getters ) - 1 , key_index ) ) else : self . _keys . append ( ( keys , len ( self . _getters ) - 1 , None ) )