class_docstr: Consumes the records from the dataset queue.
class_docstr_tok: ["Consumes","the","records","from","the","dataset","queue","."]
docstr: Create a consumer thread.
docstr_tok: ["Create","a","consumer","thread","."]
code: def __init__(
      self,
      name: str,
      api: Api,
      tags: Optional[dict] = None,
      metadata: Optional[dict] = None,
      buffer_size: int = 10000,
      upload_size=256,
      upload_interval=1.0,
      retries=10,
      timeout=15,
      on_error=None,
  ):
      """Create a consumer thread."""
      threading.Thread.__init__(self)
      self.daemon = True
      self.upload_size = upload_size
      self.upload_interval = upload_interval
      self.api = api
      self.on_error = on_error
      self.queue = Queue(maxsize=buffer_size)
      self.dataset = name
      self.tags = tags
      self.metadata = metadata
  
      self.running = True
      self.retries = retries
      self.timeout = timeout
  
imports: import atexit
  import logging
  import random
  import threading
  from queue import Empty, Queue
  from typing import Any, Dict, Iterable, List, Optional
  import backoff
  import monotonic
  import wrapt
  from argilla.client.api import Api
  from argilla.client.models import Record
  from argilla.client.sdk.commons.errors import ArApiResponseError
label_desc: Use image node_id 1 to create a new DatasetRecordsConsumer object from inherited base classes: threading with example: obj = DatasetRecordsConsumer(name, api, tags, metadata, buffer_size, upload_size, upload_interval, retries, timeout, on_error)