docstr: take batches from the dataset
  
  Args:
      batch_count: number of batch count, iterate forever when batch_count is None.
docstr_tok: ["take","batches","from","the","dataset","Args",":","batch_count",":","number","of","batch","count",",","iterate","forever","when","batch_count","is","None","."]
code: def take(self, batch_count: int = None) -> Any:
      """
      take batches from the dataset
  
      Args:
          batch_count: number of batch count, iterate forever when batch_count is None.
      """
      i = 0
      should_continue = True
      while should_continue:
          for batch_x, batch_y in self.__iter__():
              if batch_count is None or i < batch_count:
                  i += 1
                  yield batch_x, batch_y
              if batch_count and i >= batch_count:
                  should_continue = False
                  break
  
imports: from abc import ABC
  from typing import Iterable, Iterator, TYPE_CHECKING
  from typing import List, Any, Tuple
  import numpy
  import tensorflow
label_desc: Use image node_id 4 for calling the BatchDataSet obj's underlying member method code with example usage: obj.take(batch_count) without return types