toolbox/nt/database/iterator.py
def apply(self, apply_fn: callable):
        """Allows to apply functions to the complete iterator, not to the
        examples itself.

        Args:
            apply_fn: For now, it is a single function, e.g.
                `lambda it: it.shard(num_shards, shard_index)` but can
                potentially be a list in future implementations.

        Returns:

        """
        if apply_fn is None:
            return self
        elif isinstance(apply_fn, list):
            raise NotImplementedError
        else:
            return apply_fn(self)
Allows to apply functions to the complete iterator, not to the
        examples itself.

        Args:
            apply_fn: For now, it is a single function, e.g.
                `lambda it: it.shard(num_shards, shard_index)` but can
                potentially be a list in future implementations.

        Returns:

        
Allows to apply functions to the complete iterator, not to the
examples itself.
Allows to apply functions to the complete iterator not to the examples itself .
def apply(self, apply_fn: callable):
        if apply_fn is None:
            return self
        elif isinstance(apply_fn, list):
            raise NotImplementedError
        else:
            return apply_fn(self)
def apply ( self , apply_fn : callable ) : if apply_fn is None : return self elif isinstance ( apply_fn , list ) : raise NotImplementedError else : return apply_fn ( self )
Allows to apply functions to the complete iterator, not to the
examples itself.
Allows to apply functions to the complete iterator not to the examples itself .
"""Allows to apply functions to the complete iterator, not to the
        examples itself.

        Args:
            apply_fn: For now, it is a single function, e.g.
                `lambda it: it.shard(num_shards, shard_index)` but can
                potentially be a list in future implementations.

        Returns:

        """
None
self
apply_fn
callable
For now, it is a single function, e.g.
`lambda it: it.shard(num_shards, shard_index)` but can
potentially be a list in future implementations.
For now it is a single function e . g . ` lambda it : it . shard ( num_shards shard_index ) ` but can potentially be a list in future implementations .