docstr: Initialize a Kafka Message Fetcher.
  
  Keyword Arguments:
      key_deserializer (callable): Any callable that takes a
          raw message key and returns a deserialized key.
      value_deserializer (callable, optional): Any callable that takes a
          raw message value and returns a deserialized value.
      fetch_min_bytes (int): Minimum amount of data the server should
          return for a fetch request, otherwise wait up to
          fetch_max_wait_ms for more data to accumulate. Default: 1.
      fetch_max_wait_ms (int): The maximum amount of time in milliseconds
          the server will block before answering the fetch request if
          there isn't sufficient data to immediately satisfy the
          requirement given by fetch_min_bytes. Default: 500.
      fetch_max_bytes (int): The maximum amount of data the server should
          return for a fetch request. This is not an absolute maximum, if
          the first message in the first non-empty partition of the fetch
          is larger than this value, the message will still be returned
          to ensure that the consumer can make progress. NOTE: consumer
          performs fetches to multiple brokers in parallel so memory
          usage will depend on the number of brokers containing
          partitions for the topic.
          Supported Kafka version >= 0.10.1.0. Default: 52428800 (50 MB).
      max_partition_fetch_bytes (int): The maximum amount of data
          per-partition the server will return. The maximum total memory
          used for a request = #partitions * max_partition_fetch_bytes.
          This size must be at least as large as the maximum message size
          the server allows or else it is possible for the producer to
          send messages larger than the consumer can fetch. If that
          happens, the consumer can get stuck trying to fetch a large
          message on a certain partition. Default: 1048576.
      check_crcs (bool): Automatically check the CRC32 of the records
          consumed. This ensures no on-the-wire or on-disk corruption to
          the messages occurred. This check adds some overhead, so it may
          be disabled in cases seeking extreme performance. Default: True
code: def __init__(self, client, subscriptions, metrics, **configs):
      """Initialize a Kafka Message Fetcher.
  
      Keyword Arguments:
          key_deserializer (callable): Any callable that takes a
              raw message key and returns a deserialized key.
          value_deserializer (callable, optional): Any callable that takes a
              raw message value and returns a deserialized value.
          fetch_min_bytes (int): Minimum amount of data the server should
              return for a fetch request, otherwise wait up to
              fetch_max_wait_ms for more data to accumulate. Default: 1.
          fetch_max_wait_ms (int): The maximum amount of time in milliseconds
              the server will block before answering the fetch request if
              there isn't sufficient data to immediately satisfy the
              requirement given by fetch_min_bytes. Default: 500.
          fetch_max_bytes (int): The maximum amount of data the server should
              return for a fetch request. This is not an absolute maximum, if
              the first message in the first non-empty partition of the fetch
              is larger than this value, the message will still be returned
              to ensure that the consumer can make progress. NOTE: consumer
              performs fetches to multiple brokers in parallel so memory
              usage will depend on the number of brokers containing
              partitions for the topic.
              Supported Kafka version >= 0.10.1.0. Default: 52428800 (50 MB).
          max_partition_fetch_bytes (int): The maximum amount of data
              per-partition the server will return. The maximum total memory
              used for a request = #partitions * max_partition_fetch_bytes.
              This size must be at least as large as the maximum message size
              the server allows or else it is possible for the producer to
              send messages larger than the consumer can fetch. If that
              happens, the consumer can get stuck trying to fetch a large
              message on a certain partition. Default: 1048576.
          check_crcs (bool): Automatically check the CRC32 of the records
              consumed. This ensures no on-the-wire or on-disk corruption to
              the messages occurred. This check adds some overhead, so it may
              be disabled in cases seeking extreme performance. Default: True
      """
      self.config = copy.copy(self.DEFAULT_CONFIG)
      for key in self.config:
          if key in configs:
              self.config[key] = configs[key]
  
      self._client = client
      self._subscriptions = subscriptions
      self._completed_fetches = (
          collections.deque()
      )  # Unparsed responses
      self._next_partition_records = (
          None  # Holds a single PartitionRecords until fully consumed
      )
      self._iterator = None
      self._fetch_futures = collections.deque()
      self._sensors = FetchManagerMetrics(
          metrics, self.config["metric_group_prefix"]
      )
      self._isolation_level = READ_UNCOMMITTED
  
imports: from __future__ import absolute_import
  import collections
  import copy
  import logging
  import random
  import sys
  import time
  from kafka.vendor import six
  import kafka.errors
  from kafka.future import Future
  from kafka.metrics.stats import Avg, Count, Max, Rate
  from kafka.protocol.fetch import FetchRequest
  from kafka.protocol.offset import OffsetRequest, OffsetResetStrategy, UNKNOWN_OFFSET
  from kafka.record import MemoryRecords
  from kafka.serializer import Deserializer
  from kafka.structs import TopicPartition, OffsetAndTimestamp
label_desc: Use image node_id 1 to create a new Fetcher object from inherited base classes: six with example: obj = Fetcher(client, subscriptions, metrics)