
    ϑiXa                       S SK Jr  S SKrS SKrS SKrS SKJrJrJrJ	r	J
r
  S SKJrJrJr  S SKrSSKJr  \(       a  S SKJrJrJrJr  S SKJr  \
" S	5      r\" S
5      r " S S\	\   5      r " S S\\   5      r " S S\S   5      rS r " S S\\\\         5      r " S S\\   5      r  " S S\\   5      r! S       SS jjr"S 4     S S jjr# " S S\\   5      r$g)!    )annotationsN)TYPE_CHECKINGAnyCallableGenericTypeVar)NeverTypeVarTupleUnpack   )	framework)	GeneratorIterableIteratorSequence)Tensor_T_Tsc                  T    \ rS rSrSrS	S jrS
S jrSS jr\(       a  SS jr	Sr
gSr
g)Dataset+   aS  
An abstract class to encapsulate methods and behaviors of datasets.

All datasets in map-style(dataset samples can be get by a given key)
should be a subclass of `paddle.io.Dataset`. All subclasses should
implement following methods:

:code:`__getitem__`: get sample from dataset with a given index. This
method is required by reading dataset sample in :code:`paddle.io.DataLoader`.

:code:`__len__`: return dataset sample number. This method is required
by some implements of :code:`paddle.io.BatchSampler`

see :code:`paddle.io.DataLoader`.

Examples:

    .. code-block:: python

        >>> import numpy as np
        >>> from paddle.io import Dataset

        >>> # define a random dataset
        >>> class RandomDataset(Dataset):  # type: ignore[type-arg]
        ...     def __init__(self, num_samples):
        ...         self.num_samples = num_samples
        ...
        ...     def __getitem__(self, idx):
        ...         image = np.random.random([784]).astype('float32')
        ...         label = np.random.randint(0, 9, (1, )).astype('int64')
        ...         return image, label
        ...
        ...     def __len__(self):
        ...         return self.num_samples
        ...
        >>> dataset = RandomDataset(10)
        >>> for i in range(len(dataset)):
        ...     image, label = dataset[i]
        ...     # do something
c                    g N selfs    \/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/paddle/io/dataloader/dataset.py__init__Dataset.__init__U           c                `    [        SR                  SU R                  R                  5      5      e)N'{}' not implement in class {}__getitem__NotImplementedErrorformat	__class____name__r   idxs     r   r$   Dataset.__getitem__X   s,    !,33t~~66
 	
r!   c                `    [        SR                  SU R                  R                  5      5      e)Nr#   __len__r%   r   s    r   r.   Dataset.__len___   s,    !,334>>22
 	
r!   c                    g r   r   r   s    r   __iter__Dataset.__iter__h   s    Cr!   r   NreturnNoner+   intr4   r   r4   r7   r4   zIterator[_T])r)   
__module____qualname____firstlineno____doc__r   r$   r.   r   r1   __static_attributes__r   r!   r   r   r   +   s$    'R

 / r!   r   c                  @    \ rS rSrSrS	S jrS
S jrSS jrSS jrSr	g)IterableDatasetk   am  
An abstract class to encapsulate methods and behaviors of iterable datasets.

All datasets in iterable-style (can only get sample one by one sequentially, like
a Python iterator) should be a subclass of :ref:`api_paddle_io_IterableDataset` . All subclasses should
implement following methods:

:code:`__iter__`: yield sample sequentially. This method is required by reading dataset sample in :ref:`api_paddle_io_DataLoader` .

.. note::
    do not implement :code:`__getitem__` and :code:`__len__` in IterableDataset, should not be called either.

see :ref:`api_paddle_io_DataLoader` .

Examples:

    .. code-block:: python
        :name: code-example1

        >>> import numpy as np
        >>> from paddle.io import IterableDataset

        >>> # define a random dataset
        >>> class RandomDataset(IterableDataset): # type: ignore[type-arg]
        ...     def __init__(self, num_samples):
        ...         self.num_samples = num_samples
        ...
        ...     def __iter__(self):
        ...         for i in range(self.num_samples):
        ...             image = np.random.random([784]).astype('float32')
        ...             label = np.random.randint(0, 9, (1, )).astype('int64')
        ...             yield image, label
        ...
        >>> dataset = RandomDataset(10)
        >>> for img, label in dataset:
        ...     # do something
        ...     ...

When :attr:`num_workers > 0`, each worker has a different copy of the dataset object and
will yield whole dataset samples, which means samples in dataset will be repeated in
:attr:`num_workers` times. If it is required for each sample to yield only once, there
are two methods to configure different copy in each worker process to avoid duplicate data
among workers as follows. In both the methods, worker information that can be getted in
a worker process by `paddle.io.get_worker_info` will be needed.

splitting data copy in each worker in :code:`__iter__`

    .. code-block:: python
        :name: code-example2

        >>> import math
        >>> import paddle
        >>> import numpy as np
        >>> from paddle.io import IterableDataset, DataLoader, get_worker_info

        >>> class SplitedIterableDataset(IterableDataset): # type: ignore[type-arg]
        ...     def __init__(self, start, end):
        ...         self.start = start
        ...         self.end = end
        ...
        ...     def __iter__(self):
        ...         worker_info = get_worker_info()
        ...         if worker_info is None:
        ...             iter_start = self.start
        ...             iter_end = self.end
        ...         else:
        ...             per_worker = int(
        ...                 math.ceil((self.end - self.start) / float(
        ...                     worker_info.num_workers)))
        ...             worker_id = worker_info.id
        ...             iter_start = self.start + worker_id * per_worker
        ...             iter_end = min(iter_start + per_worker, self.end)
        ...
        ...         for i in range(iter_start, iter_end):
        ...             yield np.array([i])
        ...
        >>> dataset = SplitedIterableDataset(start=2, end=9)
        >>> dataloader = DataLoader(
        ...     dataset,
        ...     num_workers=2,
        ...     batch_size=1,
        ...     drop_last=True)
        ...
        >>> for data in dataloader:
        ...     print(data) # doctest: +SKIP("The output depends on the environment.")
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[2]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[3]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[4]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[5]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[6]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[7]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[8]])

splitting data copy in each worker by :code:`worker_init_fn`

    .. code-block:: python
        :name: code-example3

        >>> import math
        >>> import paddle
        >>> import numpy as np
        >>> from paddle.io import IterableDataset, DataLoader, get_worker_info

        >>> class RangeIterableDataset(IterableDataset): # type: ignore[type-arg]
        ...     def __init__(self, start, end):
        ...         self.start = start
        ...         self.end = end
        ...
        ...     def __iter__(self):
        ...         for i in range(self.start, self.end):
        ...             yield np.array([i])
        ...
        >>> dataset = RangeIterableDataset(start=2, end=9)

        >>> def worker_init_fn(worker_id):
        ...     worker_info = get_worker_info()
        ...
        ...     dataset: RangeIterableDataset = worker_info.dataset # type: ignore[assignment]
        ...     start = dataset.start
        ...     end = dataset.end
        ...     num_per_worker = int(
        ...         math.ceil((end - start) / float(worker_info.num_workers)))
        ...
        ...     worker_id = worker_info.id
        ...     dataset.start = start + worker_id * num_per_worker
        ...     dataset.end = min(dataset.start + num_per_worker, end)
        ...
        >>> dataloader = DataLoader(
        ...     dataset,
        ...     num_workers=2,
        ...     batch_size=1,
        ...     drop_last=True,
        ...     worker_init_fn=worker_init_fn)
        ...
        >>> for data in dataloader:
        ...     print(data) # doctest: +SKIP("The output depends on the environment.")
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[2]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[3]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[4]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[5]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[6]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[7]])
        Tensor(shape=[1, 1], dtype=int64, place=Place(cpu), stop_gradient=True,
            [[8]])

c                    g r   r   r   s    r   r   IterableDataset.__init__  r    r!   c                `    [        SR                  SU R                  R                  5      5      e)Nr#   r1   r%   r   s    r   r1   IterableDataset.__iter__  s,    !,33DNN33
 	
r!   c                `    [        SR                  SU R                  R                  5      5      e)N/'{}' should not be called for IterableDataset{}r$   RuntimeErrorr'   r(   r)   r*   s     r   r$   IterableDataset.__getitem__  s,    =DDt~~66
 	
r!   c                `    [        SR                  SU R                  R                  5      5      e)NrG   r.   rH   r   s    r   r.   IterableDataset.__len__  s,    =DD4>>22
 	
r!   r   Nr3   r9   )r+   r7   r4   r	   )r4   r	   )
r)   r:   r;   r<   r=   r   r1   r$   r.   r>   r   r!   r   r@   r@   k   s    ^@


r!   r@   c                  B    \ rS rSr% SrS\S'   S
S jrSS jrSS jrSr	g	)TensorDataseti%  a  
Dataset defined by a list of tensors.

Each tensor should be in shape of [N, ...], while N is the sample number,
and each tensor contains a field of sample, :code:`TensorDataset` retrieve
each sample by indexing tensors in the 1st dimension.

Args:
    tensors(list|tuple): A list/tuple of tensors with same shape in the 1st dimension.

Returns:
    Dataset: a Dataset instance wrapping tensors.

Examples:

    .. code-block:: python

        >>> import numpy as np
        >>> import paddle
        >>> from paddle.io import TensorDataset


        >>> input_np = np.random.random([2, 3, 4]).astype('float32')
        >>> input = paddle.to_tensor(input_np)
        >>> label_np = np.random.random([2, 1]).astype('int32')
        >>> label = paddle.to_tensor(label_np)

        >>> dataset = TensorDataset([input, label])

        >>> for i in range(len(dataset)):
        ...     input, label = dataset[i]
        ...     # do something
Sequence[Tensor]tensorsc                   ^ [         R                  " 5       (       d  [        S5      e[        U4S jT 5       5      (       d   S5       eTU l        g )Nz1TensorDataset con only be used in imperative modec              3  f   >#    U  H&  oR                   S    TS    R                   S    :H  v   M(     g7f)r   N)shape).0tensorrP   s     r   	<genexpr>)TensorDataset.__init__.<locals>.<genexpr>O  s.      
AHvLLOwqz//22s   .1z0tensors not have same shape of the 1st dimension)r   in_dynamic_moderI   allrP   )r   rP   s    `r   r   TensorDataset.__init__J  sY    ((**C   
AH
 
 
 	>=	> 
 r!   c                B   ^ [        U4S jU R                   5       5      $ )Nc              3  ,   >#    U  H	  oT   v   M     g 7fr   r   )rT   rU   indexs     r   rV   ,TensorDataset.__getitem__.<locals>.<genexpr>U  s     >vE]s   )tuplerP   )r   r]   s    `r   r$   TensorDataset.__getitem__T  s    >>>>r!   c                :    U R                   S   R                  S   $ Nr   )rP   rS   r   s    r   r.   TensorDataset.__len__W  s    ||A$$Q''r!   )rP   N)rP   rO   r4   r5   )r]   r7   r4   ztuple[Tensor, ...]r8   
r)   r:   r;   r<   r=   __annotations__r   r$   r.   r>   r   r!   r   rN   rN   %  s     D ?(r!   rN   r   c                ^    U c  U $ [        U [        [        45      (       a  [        U 5      $ U /$ r   )
isinstancelistr_   )values    r   to_listrj   [  s.    }%$''E{7Nr!   c                  B    \ rS rSr% SrS\S'   S
S jrSS jrSS jrSr	g	)ComposeDatasetic  a  
A Dataset which composes fields of multiple datasets.

This dataset is used for composing fields of multiple map-style
datasets of same length.

Args:
    datasets(list of Dataset): List of datasets to be composed.

Returns:
    Dataset: A Dataset which composes fields of multiple datasets.

Examples:

    .. code-block:: python

        >>> import numpy as np
        >>> import paddle
        >>> from paddle.io import Dataset, ComposeDataset

        >>> # define a random dataset
        >>> class RandomDataset(Dataset):  # type: ignore[type-arg]
        ...     def __init__(self, num_samples):
        ...         self.num_samples = num_samples
        ...
        ...     def __getitem__(self, idx):
        ...         image = np.random.random([32]).astype('float32')
        ...         label = np.random.randint(0, 9, (1, )).astype('int64')
        ...         return image, label
        ...
        ...     def __len__(self):
        ...         return self.num_samples
        ...
        >>> dataset = ComposeDataset([RandomDataset(10), RandomDataset(10)])  # type: ignore[var-annotated]
        >>> for i in range(len(dataset)):
        ...     image1, label1, image2, label2 = dataset[i]
        ...     # do something
list[Dataset[Any]]datasetsc                ~   [        U5      U l        [        U R                  5      S:  d   S5       e[        U R                  5       Ht  u  p#[	        U[
        5      (       d   S5       e[	        U[        5      (       a   S5       eUS:  d  ME  [        U5      [        U R                  US-
     5      :X  a  Mo   S5       e   g )Nr   "input datasets should not be emptyz.each input dataset should be paddle.io.Datasetz'paddle.io.IterableDataset not supported   z"lengths of datasets should be same)rh   rn   len	enumeraterg   r   r@   r   rn   idatasets       r   r   ComposeDataset.__init__  s    X4==!A%K'KK%#DMM2JAgw// @/ "'?;; 9; 1u7|s4==Q+?'@@ 8@ 3r!   c                2    [        U R                  S   5      $ rb   )rr   rn   r   s    r   r.   ComposeDataset.__len__  s    4==#$$r!   c                z    / nU R                    H  nUR                  [        X1   5      5        M!     [        U5      $ r   )rn   extendrj   r_   )r   r+   samplerv   s       r   r$   ComposeDataset.__getitem__  s2    }}GMM'',/0 %V}r!   rn   N)rn   rm   r4   r5   r8   )r4   ztuple[Unpack[_Ts]])
r)   r:   r;   r<   r=   re   r   r.   r$   r>   r   r!   r   rl   rl   c  s    %N ! %r!   rl   c                  ,    \ rS rSrSrSS jrSS jrSrg)	ChainDataseti  a  
A Dataset which chains multiple iterable-style datasets.

This dataset is used for assembling multiple datasets which should
be :ref:`api_paddle_io_IterableDataset`.

Args:
    datasets(list of IterableDatasets): List of datasets to be chainned.

Returns:
    paddle.io.IterableDataset: A Dataset which chains fields of multiple datasets.

Examples:

    .. code-block:: python

        >>> import numpy as np
        >>> import paddle
        >>> from paddle.io import IterableDataset, ChainDataset


        >>> # define a random dataset
        >>> class RandomDataset(IterableDataset):  # type: ignore[type-arg]
        ...     def __init__(self, num_samples):
        ...         self.num_samples = num_samples
        ...
        ...     def __iter__(self):
        ...         for i in range(10):
        ...             image = np.random.random([32]).astype('float32')
        ...             label = np.random.randint(0, 9, (1, )).astype('int64')
        ...             yield image, label
        ...
        >>> dataset = ChainDataset([RandomDataset(10), RandomDataset(10)])
        >>> for image, label in iter(dataset):
        ...     # do something
        ...     ...

c                    [        U5      U l        [        U R                  5      S:  d   S5       e[        U R                  5       H!  u  p#[	        U[
        5      (       a  M   S5       e   g )Nr   rp   z3ChainDataset only support paddle.io.IterableDataset)rh   rn   rr   rs   rg   r@   rt   s       r   r   ChainDataset.__init__  s\    X4==!A%K'KK%#DMM2JAg77 E7 3r!   c              #  J   #    U R                    H  nU S h  vN   M     g  N	7fr   r~   )r   rv   s     r   r1   ChainDataset.__iter__  s     }}G %s   #!
#r~   N)rn   zlist[IterableDataset[Any]])r4   zIterator[Any])r)   r:   r;   r<   r=   r   r1   r>   r   r!   r   r   r     s    %Nr!   r   c                  L    \ rS rSr% SrS\S'   S\S'   SS jrSS jrSS	 jrS
r	g)Subseti  a  
Subset of a dataset at specified indices.

Args:
    dataset (Dataset): The whole Dataset.
    indices (sequence): Indices in the whole set selected for subset.

Returns:
    List[Dataset]: A Dataset which is the subset of the original dataset.

Examples:

    .. code-block:: python

        >>> import paddle

        >>> class RangeDataset(paddle.io.Dataset):  # type: ignore[type-arg]
        ...     def __init__(self, start, stop):
        ...         self.start = start
        ...         self.stop = stop
        ...
        ...     def __getitem__(self, index):
        ...         return index + self.start
        ...
        ...     def __len__(self):
        ...         return self.stop - self.start

        >>> # Example 1:
        >>> a = paddle.io.Subset(dataset=RangeDataset(1, 4), indices=[0, 2])
        >>> print(list(a))
        [1, 3]

        >>> # Example 2:
        >>> b = paddle.io.Subset(dataset=RangeDataset(1, 4), indices=[1, 1])
        >>> print(list(b))
        [2, 2]
Dataset[_T]rv   Sequence[int]indicesc                    Xl         X l        g r   rv   r   )r   rv   r   s      r   r   Subset.__init__  s    r!   c                :    U R                   U R                  U      $ r   r   r*   s     r   r$   Subset.__getitem__	  s    ||DLL-..r!   c                ,    [        U R                  5      $ r   )rr   r   r   s    r   r.   Subset.__len__  s    4<<  r!   r   N)rv   r   r   r   r4   r5   r6   r8   rd   r   r!   r   r   r     s%    $L /!r!   r   c           
     V   [         R                  " [        U5      S5      (       a  [        U5      S::  a  / n[        U5       H\  u  pEUS:  d  US:  a  [	        SU S35      e[        [         R                  " [        U 5      U-  5      5      nUR                  U5        M^     [        U 5      [        U5      -
  n[        U5       H  nU[        U5      -  nX8==   S-  ss'   M     Un[        U5       H'  u  pIU	S:X  d  M  [        R                  " SU S35        M)     [        U5      [        U 5      :w  a  [	        S5      e[        R                  " [        U5      5      R                  5       n
[        [!        U5      U5       VV	s/ s H  u  p[#        X
X-
  U 5      PM     sn	n$ s  sn	nf )a  
Randomly split a dataset into non-overlapping new datasets of given lengths.
Optionally fix the generator for reproducible results, e.g.:

Args:
    dataset (Dataset): Dataset to be split
    lengths (sequence): lengths or fractions of splits to be produced
    generator (Generator, optional): Generator used for the random permutation. Default is None then the DefaultGenerator is used in manual_seed().

Returns:
    Datasets: A list of subset Datasets, which are the non-overlapping subsets of the original Dataset.

Examples:

    .. code-block:: python

        >>> import paddle

        >>> paddle.seed(2023)
        >>> a_list = paddle.io.random_split(range(10), [3, 7])  # type: ignore[arg-type, var-annotated]
        >>> print(len(a_list))
        2

        >>> # output of the first subset
        >>> for idx, v in enumerate(a_list[0]):
        ...     print(idx, v) # doctest: +SKIP("The output depends on the environment.")
        0 7
        1 6
        2 5

        >>> # output of the second subset
        >>> for idx, v in enumerate(a_list[1]):
        ...     print(idx, v) # doctest: +SKIP("The output depends on the environment.")
        0 1
        1 9
        2 4
        3 2
        4 0
        5 3
        6 8
rq   r   zFraction at index z is not between 0 and 1zLength of split at index z- is 0. This might result in an empty dataset.zDSum of input lengths does not equal the length of the input dataset!)mathisclosesumrs   
ValueErrorr7   floorrr   appendrangewarningswarnpaddlerandpermtolistzip_accumulater   )rv   lengths	generatorsubset_lengthsru   fracn_items_in_split	remainderidx_to_add_atlengthr   offsets               r   random_splitr     s   \ ||CL!$$W): )GAax4!8 (+BC   #4::c'lT.A#BC!!"23 * L3~#66	y!AN 33M)Q.) " !"7+IA{/s 3= > , 7|s7|#R
 	

 ooc'l+224G "+g"6@@NF 	w&9:@  s   F%c                
    X-   $ r   r   )xys     r   <lambda>r   c  s    aer!   c              #     #    [        U 5      n [        U5      nUv   U H  nU" X45      nUv   M     g! [         a     gf = f7f)a  
Return running totals

Args:
    iterable: any iterable object for example dataset.
    y (x): one element in the iterable object.
    fn (x, y): Defaults to lambdax.

Yields:
    yields total from beginning iterator to current iterator.

Example code:

    .. code-block:: python

        >>> list(_accumulate([1, 2, 3, 4, 5]))
        [1, 3, 6, 10, 15]

        >>> import operator
        >>> list(_accumulate([1, 2, 3, 4, 5], operator.mul))
        [1, 2, 6, 24, 120]
N)iternextStopIteration)iterablefnittotalelements        r   r   r   b  sQ     4 
hBR K5"   s$   A4 A
AA AAc                  J    \ rS rSrSr\S	S j5       rS
S jrSS jrSS jr	Sr
g)ConcatDataseti  a  
Dataset as a concatenation of multiple datasets.

This class is useful to assemble different existing datasets.

Args:
    datasets (sequence): List of datasets to be concatenated

Returns:
    Dataset: A Dataset which concatenated by multiple datasets.

Examples:

    .. code-block:: python

        >>> import numpy as np
        >>> import paddle
        >>> from paddle.io import Dataset, ConcatDataset

        >>> # define a random dataset
        >>> class RandomDataset(Dataset):  # type: ignore[type-arg]
        ...     def __init__(self, num_samples):
        ...         self.num_samples = num_samples
        ...
        ...     def __getitem__(self, idx):
        ...         image = np.random.random([32]).astype('float32')
        ...         label = np.random.randint(0, 9, (1, )).astype('int64')
        ...         return image, label
        ...
        ...     def __len__(self):
        ...         return self.num_samples
        ...
        >>> dataset = ConcatDataset([RandomDataset(10), RandomDataset(10)])  # type: ignore[var-annotated]
        >>> for i in range(len(dataset)):
        ...     image, label = dataset[i]
        ...     # do something
c                b    / Sp!U  H%  n[        U5      nUR                  XB-   5        X$-  nM'     U$ rb   )rr   r   )sequencersels        r   cumsumConcatDataset.cumsum  s7    11AAAHHQUOFA  r!   c                   [        U5      U l        [        U R                  5      S:  d   S5       eU R                   H  n[        U[        5      (       d  M   S5       e   U R                  U R                  5      U l        g )Nr   z(datasets should not be an empty iterablez.ConcatDataset does not support IterableDataset)rh   rn   rr   rg   r@   r   cumulative_sizes)r   rn   ds      r   r   ConcatDataset.__init__  sr    X4==!A% 	
6	
% A!!_55 @5  !%DMM :r!   c                     U R                   S   $ )N)r   r   s    r   r.   ConcatDataset.__len__  s    $$R((r!   c                    US:  a)  U* [        U 5      :  a  [        S5      e[        U 5      U-   n[        R                  " U R                  U5      nUS:X  a  UnOXR                  US-
     -
  nU R
                  U   U   $ )Nr   z8absolute value of index should not exceed dataset lengthrq   )rr   r   bisectbisect_rightr   rn   )r   r+   dataset_idx
sample_idxs       r   r$   ConcatDataset.__getitem__  s    7tc$i N  d)c/C))$*?*?E!J44[1_EEJ}}[)*55r!   )r   rn   N)r   zSequence[Any]r4   z	list[int])rn   zIterable[Dataset[Any]]r4   r5   r8   r6   )r)   r:   r;   r<   r=   staticmethodr   r   r.   r$   r>   r   r!   r   r   r     s+    $L  	;)6r!   r   r   )rv   r   r   r   r   z
Any | Noner4   zlist[Subset[_T]])r   zIterable[_T]r   zCallable[[_T, _T], _T]r4   zGenerator[_T, None, None])%
__future__r   r   r   r   typingr   r   r   r   r   typing_extensionsr	   r
   r   r    r   collections.abcr   r   r   r   r   r   r   r   r@   rN   rj   r_   rl   r   r   r   r   r   r   r!   r   <module>r      s/   #     : 9  GGT]5=0gbk =0@w
gbk w
t3(GH% 3(l@WU6#;/0 @F2?3' 2j2!WR[ 2!p !OOO O 	Of :L"" 6""JJ6GBK J6r!   