docstr: Update the fetch positions for the provided partitions.
  
  Arguments:
      partitions (list of TopicPartitions): partitions to update
  
  Raises:
      NoOffsetForPartitionError: if no offset is stored for a given
          partition and no reset policy is available
code: def update_fetch_positions(self, partitions):
      """Update the fetch positions for the provided partitions.
  
      Arguments:
          partitions (list of TopicPartitions): partitions to update
  
      Raises:
          NoOffsetForPartitionError: if no offset is stored for a given
              partition and no reset policy is available
      """
      # reset the fetch position to the committed position
      for tp in partitions:
          if not self._subscriptions.is_assigned(tp):
              log.warning(
                  "partition %s is not assigned - skipping offset"
                  " update",
                  tp,
              )
              continue
          elif self._subscriptions.is_fetchable(tp):
              log.warning(
                  "partition %s is still fetchable -- skipping offset"
                  " update",
                  tp,
              )
              continue
  
          if self._subscriptions.is_offset_reset_needed(tp):
              self._reset_offset(tp)
          elif self._subscriptions.assignment[tp].committed is None:
              # there's no committed position, so we need to reset with the
              # default strategy
              self._subscriptions.need_offset_reset(tp)
              self._reset_offset(tp)
          else:
              committed = self._subscriptions.assignment[
                  tp
              ].committed.offset
              log.debug(
                  "Resetting offset for partition %s to the committed"
                  " offset %s",
                  tp,
                  committed,
              )
              self._subscriptions.seek(tp, committed)
  
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 6 for calling the Fetcher obj's underlying member method code with example usage: obj.update_fetch_positions(partitions) without return types